P - Travelling Politician

A politician from the Alliance of Conservative Monarchists (ACM) is campaigning for the next election. In order to guarantee his victory, he has to make at least k public speeches. He will give one speech every day. If he has to give several speeches in the same city, they can not be on consecutive days because that is unproductive. However, the politician believes that, for example, giving one speech on Monday and the next one in the same city on Wednesday is alright because after two days, the people will forget about him and his second speech will have as much effect as the first one.

He is absolutely certain that he will win, so at the same time he is moving to the capital. This means that his first speech will be given in his hometown, and his last speech - in the capital city. He knows that his speech-giving abilities deteriorate when he is tired. So he does not want to give more speeches than he has to - k will be enough to win. What is the minimum number of speeches he has to give in order to start in his hometown, end up in the capital and give at least k speeches on the way, without ever giving a speech in the same city on two consecutive days?

Input

The input will consist of several test cases. Each test case will begin with 3 integers on a line - n (the number of cities on the map), m (the number of roads connecting cities) and k (the minimum number of speeches). The next m lines will each contain 2 integers, u and v, meaning that the politician can visit city v immediately after visiting city u. All other routes of travel are infeasible from the point of view of his budget. The politician's hometown is city number 0, and the capital is city number n-1.
2<=n<=50.
2<=k<=16.

Output

Print one line per test case, giving the minimum total number of speeches. If this is impossible to do, print "LOSER". See examples.

Sample input

3 3 3
0 1
0 2
1 2
5 6 5
0 1
0 3
1 2
2 4
3 2
3 4
3 3 10
0 1
1 0
1 2

Sample output

3
LOSER
11