#include<iostream>
#include<vector>
#include<set>
using namespace std;
bool islegal[11];//判断该玩家是否出局
vector<vector<int>> book;//存储所有玩家给出的答案
set<int> legal, hasvisited;//统计合法数,已经出现过的数字
int main(){
int n, m;
scanf("%d %d", &n, &m);
hasvisited.insert(n);
hasvisited.insert(m);
legal.insert(abs(m-n));
scanf("%d %d", &n, &m);
book.resize(n+1);
for(int i = 1; i <= n; i++){
book[i].resize(m+1);
for(int j = 1; j <= m; j++){
scanf("%d", &book[i][j]);
}
}
fill(islegal, islegal+11, true);
//第i局 第j玩家
for(int i = 1; i <= m; i++){
vector<int> isout;//存储每回合出具玩家
for(int j = 1; j <= n; j++){
if(islegal[j] == false) continue;
if(hasvisited.find(book[j][i]) != hasvisited.end() || legal.find(book[j][i]) == legal.end()){
//不合法
isout.push_back(j);
islegal[j] = false;
}
for (auto it = hasvisited.begin(); it != hasvisited.end(); it++) {
legal.insert(abs(*it - book[j][i]));
}
hasvisited.insert(book[j][i]);
}
for(int j = 0; j < isout.size(); j++){
printf("Round #%d: %d is out.\n", i, isout[j]);
}
}
vector<int> anss;
for(int i = 1; i <= n; i++){
if(islegal[i] == true){
anss.push_back(i);
}
}
if(anss.size() == 0){
printf("No Winner.\n");
}else{
printf("Winner(s): ");
for(int i = 0; i < anss.size(); i++){
if(i != 0) printf(" ");
printf("%d", anss[i]);
}
}
return 0;
}