AtCoder Beginner Contest 131 Task F. Must Be Rectangular

NoSuchKey