MIRRORED - Mirrored Pairs

no tags 

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

hide comments
Vikram Kamath: 2011-12-31 07:13:40

Is the case important?

Benjamin Pinaya: 2011-12-25 23:19:39

And what about I? Really weird problem :D

Hermano: 2011-12-09 10:52:26

I was getting WA until I read Kroma's comment. I remeber what the word symmetrical really means.

Andy: 2011-10-13 11:18:58

kept getting WA, it turns out that the output "pair" is with lowercase p lol

Omar Simón Francisco Prieto Chacón - osfprieto: 2011-04-18 17:51:50

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 ' '

nixeagle: 2011-01-30 19:29:30

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
saibharath: 2010-12-24 15:04:15

very frustrating ....couldnt get the answer

Garima Sachan: 2010-10-29 20:52:58

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
Harits Elfahmi: 2010-07-17 13:39:00

I use C++, and i used getchar().


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