
#include "poker.h"
#include<cstdio>
#include<cstdlib>
#include<algorithm>
using namespace std;

int cards[20] = {1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10};
int mychips,opchips;

bool valid(int bet) {
  if(bet < 1) return false;
  if(bet > mychips || bet > opchips) return false;
  return true;
}

int generateRandom(int p) {return rand()%p;}

int main() {
  for(int i=0;i<20;i++) scanf("%d",&cards[i]);

  mychips = 30, opchips = 30;
  init();
  for(int game=0;game<10;game++) {
    int mycard = cards[2*game], opcard = cards[2*game+1];
    int bet = betting(game == 0 ? -1 : cards[2*game-2],opcard);
    if(!valid(bet)) {
      puts("Wrong betting!");
      return 0;
    }
    if(mycard > opcard) {
      mychips += bet; opchips -= bet;
    }
    else if(mycard < opcard) {
      mychips -= bet; opchips += bet;
    }
    if(mychips == 0 || opchips == 0) break;
  }
  if(mychips > opchips) puts("You win!");
  else puts("You lose!");
  return 0;
}

