void main(){import std.stdio;string s;while((s=readln)!is null)write=s[s[1]-s[2]?4:2];}