There are *n* cities in Berland, each of them has a unique id — an integer from 1 to *n*, the capital is the one with id 1. Now there is a serious problem in Berland with roads — there are no roads.

That is why there was a decision to build *n* - 1 roads so that there will be exactly one simple path between each pair of cities.

In the construction plan *t* integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*t*</sub> were stated, where *t* equals to the distance from the capital to the most distant city, concerning new roads. *a*<sub class="lower-index">*i*</sub> equals the number of cities which should be at the distance *i* from the capital. The distance between two cities is the number of roads one has to pass on the way from one city to another. 

Also, it was decided that among all the cities except the capital there should be exactly *k* cities with exactly one road going from each of them. Such cities are dead-ends and can't be economically attractive. In calculation of these cities the capital is not taken into consideration regardless of the number of roads from it. 

Your task is to offer a plan of road's construction which satisfies all the described conditions or to inform that it is impossible.
The first line contains three positive numbers *n*, *t* and *k* (2 ≤ *n* ≤ 2·10<sup class="upper-index">5</sup>, 1 ≤ *t*, *k* &lt; *n*) — the distance to the most distant city from the capital and the number of cities which should be dead-ends (the capital in this number is not taken into consideration). 

The second line contains a sequence of *t* integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*t*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> &lt; *n*), the *i*-th number is the number of cities which should be at the distance *i* from the capital. It is guaranteed that the sum of all the values *a*<sub class="lower-index">*i*</sub> equals *n* - 1.
none
7 3 3
2 3 1
7
1 2
2 6
5 3
2 4
1 3
7 4
14 5 6
4 4 2 2 1
14
12 14
7 3
6 10
5 1
13 10
1 3
8 4
9 5
4 1
6 2
12 10
6 11
2 1
3 1 1
2
-1
6 3 3
1 2 2
6
3 5
6 3
2 1
4 2
2 3
11 6 4
1 2 2 1 3 1
11
3 5
11 8
7 9
10 7
7 8
2 3
2 4
6 4
1 2
5 7
21 10 9
2 1 3 1 1 1 3 2 3 3
21
5 4
14 18
7 4
12 10
17 15
2 1
10 11
20 16
9 10
14 16
4 2
1 3
14 11
8 9
13 10
16 19
5 8
16 21
6 4
15 12
51 16 31
1 3 3 3 4 4 3 5 4 1 3 3 3 2 3 5
51
49 44
28 32
31 23
36 33
16 20
9 12
4 2
42 45
18 12
44 51
33 38
11 8
34 32
23 20
8 5
39 36
39 42
48 44
16 21
12 16
23 30
12 19
9 15
20 24
37 33
13 9
20 25
23 29
6 3
17 12
42 44
50 44
7 4
36 40
28 23
35 32
33 32
9 6
43 39
36 41
1 2
47 44
20 27
22 16
46 42
14 9
7 10
5 2
3 2
20 26
1001 179 490
8 8 6 7 1 6 10 3 7 8 8 7 2 4 9 8 4 5 8 3 5 7 9 10 9 5 2 6 5 3 3 2 9 6 4 2 10 2 3 5 7 4 5 8 3 9 5 9 2 5 4 9 3 8 2 9 6 7 4 4 10 9 8 5 2 6 9 10 9 3 1 9 9 3 9 4 10 1 7 4 4 9 2 5 6 4 9 3 4 10 1 3 10 3 3 10 9 2 5 6 6 1 1 9 4 9 9 7 5 5 10 3 8 7 10 3 2 10 6 1 4 4 5 7 4 7 1 1 8 5 8 6 2 9 3 3 5 8 7 1 8 3 6 2 8 10 4 5 1 6 3 4 6 9 8 10 1 3 9 9 4 6 6 7 10 2 4 8 2 1 5 4 5 3 7 2 5 9 3
1001
695 689
737 746
383 376
188 185
312 318
901 891
33 39
413 404
793 794
865 854
831 839
811 814
340 351
944 952
985 991
569 579
776 770
845 840
20 26
1 2
56 48
778 789
471 475
811 815
415 419
767 758
146 137
510 498
621 612
383 389
649 663
360 369
83 87
756 750
531 534
164 169
489 494
258 255
24 31
513 516
188 193
794 802
740 729
440 449
890 887
738 729
444 434
813 811
649 646
240 244
704 714
905 891
167 158
192 188
305 302
958 962
169 175
705 70...
200000 5 190092
47191 35051 33744 40989 43024
200000
115988 194495
115988 186970
136478 82244
150960 82244
185127 115988
191591 115988
187442 115988
115988 181548
115988 167357
90874 47193
115988 182235
166965 115988
115988 195352
115988 177339
188896 115988
186993 115988
115988 192573
172293 115988
115988 199003
196650 115988
166407 115988
115988 186132
115988 192130
115988 192121
115988 175735
178910 115988
121195 82244
115988 193692
188417 115988
127665 82244
199363 115988
155907 82244
147227 82244
115988 186681
1...
2000 3 1337
970 632 397
2000
1 695
1786 972
1327 357
1 188
1253 283
972 1891
1787 972
1 413
156 1126
865 1
1705 972
1 814
1 348
992 1624
1068 98
1 575
972 1957
1 845
149 1119
972 1993
1 54
1 789
1 475
1 815
1 419
1841 972
1 147
507 1
1 621
427 1397
1 663
1118 148
1 87
756 1
556 1526
972 1970
972 1837
1872 972
1 31
1 517
192 1
391 1361
242 1212
1 449
890 1
1379 409
983 1615
813 1
1 649
1128 158
1945 972
978 1610
167 1
319 1289
1592 622
1986 972
371 1341
1 705
1524 554
175...
2001 34 1714
28 91 43 47 52 42 69 95 11 70 59 68 88 92 71 19 7 70 100 66 1 38 36 88 58 52 87 85 40 75 26 42 85 99
2001
294 336
954 1024
345 303
1265 1376
1463 1596
1776 1892
1025 954
487 469
1470 1411
1411 1528
2 61
954 1090
1194 1190
228 280
1872 1776
1265 1403
1485 1411
1644 1550
941 857
869 765
568 480
1353 1433
1476 1411
609 759
469 501
944 857
699 609
1635 1688
948 928
609 755
1229 1191
1463 1579
1955 1818
765 912
907 765
1024 1158
263 350
550 665
954 1083
1969 1818
876 765
104 2
1003 947
1919 1818
609 744
1776 1893
1408 1265
663 550
1534 1411
154 63
28 1
1411 1...
150001 7 147760
8286 37995 4975 28947 23162 15808 30827
150001
139099 103367
136999 103367
125242 103367
122472 103367
35871 2
80205 106310
103367 134790
128032 103367
145793 103367
46283 56175
116621 80205
131527 103367
103367 146171
103367 132459
103367 133969
103367 129263
112482 80205
85396 51258
129908 103367
108776 80205
103367 142201
127810 103367
109636 80205
103367 140692
1 3018
140898 103367
103367 147446
46283 75221
103367 127230
103367 142840
2 41625
103367 133122
131090 103367
101465 51258
103367 123412
138388 10...
200000 5 195020
47330 743 46163 36629 69134
200000
94238 194495
94238 186970
136478 94238
150960 94238
185127 94238
191591 94238
187442 94238
94238 181548
94238 167357
91616 47332
94238 182235
166965 94238
94238 195352
94238 177339
188896 94238
186993 94238
94238 192573
172293 94238
94238 199003
196650 94238
166407 94238
94238 186132
94238 192130
94238 192121
94238 175735
178910 94238
124686 48075
94238 193692
188417 94238
94528 48365
199363 94238
155907 94238
147227 94238
94238 186681
189754 94238
94238 195609
1...
200000 18 199982
19878 5843 2935 16419 14574 12751 15665 18170 12578 14385 6515 9607 4121 224 14079 4972 10940 16343
200000
174928 167746
167746 176523
172718 191873
153667 171107
172718 193613
172718 197400
172718 192738
198484 172718
110297 88067
172718 186509
139715 153381
153667 167876
167746 180125
172718 185267
153443 155797
172718 190718
116189 88067
163463 153443
172718 196975
166400 153443
150876 139715
149767 139715
172718 191355
172718 187814
156266 153443
106237 131171
178082 167746
172718 194718
172718 199797
172718 193391
172718 199525
133200 143479
184398 172718
178155 167...
200000 4 90823
63010 23084 77424 36481
-1
200000 1 199999
199999
200000
1 120418
162163 1
156675 1
187544 1
1 187800
1 192966
184902 1
191949 1
1 126665
191367 1
1 183579
1 181788
1 129868
197312 1
1 197439
1 179130
1 164809
1 114623
188700 1
104067 1
1 177790
181957 1
1 136583
169479 1
1 197419
191015 1
8501 1
196002 1
1 161615
1 199967
1 191729
184391 1
1 187114
194633 1
173285 1
1 189731
1 172409
174313 1
126009 1
177518 1
189355 1
1 168589
184969 1
1 179245
1 158495
171452 1
130676 1
1 198971
180303 1
190327 1
15838...
6390 29 1740
407 261 213 375 118 127 276 322 353 166 120 308 178 261 270 275 157 26 36 159 20 272 152 316 213 237 167 372 232
-1
2 1 1
1
2
2 1
4 2 3
1 2
-1
17 5 11
5 3 2 5 1
17
3 8
17 12
14 10
6 1
10 7
13 10
4 1
15 10
1 3
7 2
1 2
2 9
10 12
1 5
16 10
7 11
16 4 10
2 3 5 5
16
8 5
7 12
7 4
2 4
2 1
9 4
4 11
4 10
5 3
13 7
7 15
2 6
1 3
16 7
14 7
2 1 1
1
2
2 1
3 2 2
1 1
-1
3 2 2
1 1
-1
4 2 3
2 1
-1
4 1 1
3
-1
4 3 1
1 1 1
4
2 1
2 3
3 4
5 4 3
1 1 1 1
-1
5 4 3
1 1 1 1
-1
5 4 4
1 1 1 1
-1
5 4 4
1 1 1 1
-1
6 4 5
1 1 1 2
-1
# your code goes here
n, t, k = map(int,input().split())
l = list(map(int,input().split()))
v = [[]]*(200005)
fa = [0]*(n+1)
v[0].append(1)
c, s = 1, 1
for i in range(1,t+1):
	param = l[i-1]
	s = s + param - 1
	for i in range(param):
		c +=1
		x = c
		fa[x] = v[i-1][0]
		v[i].append(x)
for i in range(2, t+1):
	mnv = min(len(v[i-1]), len(v[i]))
	for j in range(1, mnv):
		if s > k:
			fa[v[i][j]] = v[i-1][j]
			s-=1
if s != k:
	print(-1)
else:
	print(n)
	for i in range(2,n+1):
		print(fa[i],i)
		
  	 		  	 			  					 			 		 		