Back
Close

Block Game

Statement

 Goal

The citizens of Byteland regularly play a game. They have blocks each denoting some integer from 0 to 9. These are arranged together in a random manner without seeing to form different numbers keeping in mind that the first block is never a 0. Once they form a number they read in the reverse order to check if the number and its reverse is the same. If both are same then the player wins. We call such numbers palindrome.

Ash happens to see this game and wants to simulate the same in the computer. As the first step he wants to take an input from the user and check if the number is a palindrome and declare if the user wins or not.
Input
N is an Integer.
Output
For each input output "wins" if the number is a palindrome and "loses" .
Constraints
1<=N<=20000
Example
Input
131
Output
wins

Game modes
Fastest, Shortest

Test cases
Simple Test
Input
131
Output
wins

Easy Validator
Input
31
Output
loses

Easy 2 Test
Input
243
Output
loses

Very Easy Validator
Input
404
Output
wins

Medium Test
Input
666
Output
wins

Hard Validator
Input
616
Output
wins

Hard 2 Test
Input
9014
Output
loses

Difficult Validator
Input
100001
Output
wins

Solution language

Solution

Stub generator input