qs=[["A","E"],["B"],["C"],["D"]] n=gets.to_i n.times{|i| t=qs[i%4].shift qs[(i+1)%4]<