P11757 [AOJ] Where is the Boundary
普及
题目描述

Example

Input

2 1
WE

Output

1 2

输入格式

见题面

输出格式

见题面

样例输入
2 1 WE
样例输出
1 2