MAIN71 - Lexicographical ordering
In this problem you have to compare two strings lexicographically for a given ordering of the English alphabet. For example, the usual ordering is "abcdefghijklmnopqrstuvwxyz" but in this problem ordering can be any permutation of these 26 characters.
Input
First line contains T the number of test cases. then T test case follow. Each test case is described in 3 lines. First describes the ordering (in exactly 26 characters) next two lines contains two strings A and B of equal length.
Output
For each test case print ">" if A > B or "<" if A < B else print "="
Example
Input: 1 abcdefghijklmnopqrstuvwxyz nsit nits Output: >
Added by: | Mahesh Chandra Sharma |
Date: | 2011-03-13 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | Own problem used for NSIT-IIITA Main contest #7 |