import std.stdio;void main(){foreach(string s;stdin.lines)write=s[s[1]-s[2]?4:2];}