f=int(input())
n=int(input())
a=[int(x) for x in input().split()]
ans=[]
type=[0,2,5]
time=0
pre=0
k=0
last_f=-1
for x in a:
k+=1
if f-x==-2 or f-x==-3 or f-x==5:
ans.append(f)
print(" ".join(map(str,ans)),': Won at round',k)
break
elif f-x==2 or f-x==3 or f-x==-5:
ans.append(f)
print(" ".join(map(str,ans)),': Lost at round',k)
break
if x==f:
time+=1
ans.append(f)
if time<2:
pre=x
last_f=f
f=x
elif time==2:
last_f=f
if pre==5:
f=2
elif pre==2:
f=0
elif pre==0:
f=5
time=0
if k==n and last_f==a[n-1]:
print(" ".join(map(str,ans)),': Drew at round',k)