print(".*[2D]\n(.*\n(?=.))?".r findAllIn""++io.Source.stdin next)