MIRRORED - Mirrored Pairs

The letters b and d are mirror images of each other, as are p and q. No other pairs of letters are mirrors, except for letters like H that are mirrors of themselves, and what’s the interest in a pair that’s just two of the same letter? We refuse to count self-mirrors as mirrored pairs.

Input

Input is a list of lines with two characters on each line. Your program should end immediately when it encounters a line with two spaces.

Output

The first line of output should contain only Ready. For each pair of characters (prior to a pair of spaces), print the line Mirrored pair if the characters are mirrors, otherwise print the line Ordinary pair.

Example

Input:
Fr
qp
HH
db
  
pq

Output:
Ready
Ordinary pair
Mirrored pair
Ordinary pair
Mirrored pair

Added by:Daniel Gómez Didier
Date:2008-11-17
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ERL JS-RHINO NODEJS PERL6 VB.NET
Resource:2007 PUJ - Circuito de Maratones ACIS / REDIS

hide comments
2017-05-29 03:34:59
If you look at input,it appears as if we have to terminate if we encounter enter key but read the question again.Cost me 5 WA's.Finally got it.
2017-01-31 15:37:24 Wahyu Hendro Hartono
AC after case mistake hehe
2016-08-16 16:38:19
not at all useful to do other than input termination
2015-06-29 16:44:53
funny problem
2015-04-21 20:50:21 karan
useless question :/
2015-04-10 15:57:59 Unnati Gupta
bd, db, qp and pq are mirrored pairs. Got AC after several tries. All because of lack of info.

Last edit: 2015-04-10 15:59:52
2014-12-20 12:54:20 Swapnil Borse
Just a word of caution, whenever there has to be a string written to the output always copy paste it from the sample output so that you never get a WA for silly reasons like missing caps or full stop or spelling mistake :P
2013-07-31 19:27:36 aman kumar jha
waste of time. got WA (as "Ready" is with capital R :( ).
finally got AC.
2013-02-15 23:42:02 reggaeguitar
The description does not make it clear that the mirrored pairs can be in any order. For example "qp" and "pq" would both be considered mirrored pairs. The description does not explain that case does not matter also. Very poor problem description. Also, why print ready on the first line? This minor detail cost me a couple WA

Last edit: 2013-02-15 23:42:57
2012-08-02 21:21:00 Arkadiusz Bulski
I like this one, someone had imagination he he.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.