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
2011-12-31 07:13:40 Vikram Kamath
Is the case important?
2011-12-25 23:19:39 Benjamin Pinaya
And what about I? Really weird problem :D
2011-12-09 10:52:26 Hermano
I was getting WA until I read Kroma's comment. I remeber what the word symmetrical really means.

2011-10-13 11:18:58 Andy
kept getting WA, it turns out that the output "pair" is with lowercase p lol
2011-04-18 17:51:50 Omar Simón Francisco Prieto Chacón - osfprieto
try using the getline function of iostream, it saves the line of the console in a char array, form ther you can see if the two first characters are ' '
2011-01-30 19:29:30 nixeagle
When you see a line containing ' ' followed by a newline.

where the chars in between the ' ' have ASCII/UTF8 character code 0x20.

Last edit: 2011-01-30 19:31:19
2010-12-24 15:04:15 saibharath
very frustrating ....couldnt get the answer
2010-10-29 20:52:58 Garima Sachan
Whts problem in this code?

[code deleted]

edit by kokosek:
You should have read notes mentioned below:
1. Don't post any source code here.
3. For more discussion (hints, ideas, solutions) please visit our forum.

Last edit: 2010-10-30 07:51:18
2010-07-17 13:39:00 Harits Elfahmi
I use C++, and i used getchar().
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.