1 #include
2 #include
3 #include
4 using namespace std;
5
6 const int MAXN = 1005;
7 const int MAXE = 2005;
8
9 int n, m, f, ecnt;
10 int head[MAXN], dis[MAXN];
11 int to[MAXE], next[MAXE];
12
13 void add_edge(int u, int v) {
14 to[ecnt] = v; next[ecnt] = head[u]; head[u] = ecnt++;
15 to[ecnt] = u; next[ecnt] = head[v]; head[v] = ecnt++;
16 }
17
18 void bfs() {
19 queue<int> que; que.push(1);
20 dis[1] = 1;
21 while(!que.empty()) {
22 int u = que.front(); que.pop();
23 for(int p = head[u]; p; p = next[p]) {
24 int &v = to[p];
25 if(!dis[v]) {
26 dis[v] = dis[u] + 1;
27 que.push(v);
28 }
29 }
30 }
31 }
32
33 int win[MAXN];
34
35 int dfs(int u) {
36 if(win[u] != -1) return win[u];
37 for(int p = head[u]; p; p = next[p]) {
38 int &v = to[p];
39 if(dis[v] == dis[u] + 1) {
40 if(dis[u] & 1) {if(dfs(v)) return win[u] = 1;}
41 else if(!dfs(v)) return win[u] = 0;
42 }
43 }
44 return win[u] = !(dis[u] & 1);
45 }
46
47 int main() {
48 scanf("%d%d", &n, &m);
49 ecnt = 1;
50 while(m--) {
51 int u, v;
52 scanf("%d%d", &u, &v);
53 add_edge(u, v);
54 }
55 bfs();
56 memset(win, -1, sizeof(win));
57 if(dfs(1)) puts("Vladimir");
58 else puts("Nikolay");
59 }