Under construction

Still being built. Things may change

Dragged-out Duel

Time limit1sMemory limit1024 MB

Summary
Given two strings of rock-paper-scissors choices over n rounds, output whether you or Guile wins more rounds.
Level

Easy2 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

You and your friend Guile plan to spend an afternoon playing the new Street Fighter game. You both want to start on the left, because you have only practiced your combos from the left. You settle the question with a rock-paper-scissors duel.

The duel is a best-of-nn match made of nn single rounds. Whoever wins more rounds starts on the left. If you both pick the same option in a round, that round is not replayed.

Rock beats scissors, scissors beats paper, and paper beats rock. If you both make the same choice, the round is a draw.

Input

The first line contains an integer nn (1≤n≤10 0001\leq n\leq 10\,000), the number of rounds.

The second line contains nn characters, your choices in each round. The third line contains nn characters, Guile's choices in each round. Each character is R (rock), P (paper), or S (scissors).

Output

If you win more rounds, output victory. If Guile wins more rounds, output defeat.

It is guaranteed that the two of you never have the same number of wins.

Examples2

  1. Example 1

    Input
    5
    RRSSP
    SSSSS
    
    Expected output
    victory
    
  2. Example 2

    Input
    6
    PRSRPS
    PSSPPR
    
    Expected output
    defeat