program y5003 implicit none integer(8)::N,i,get=0,flg=0 character(10000)::S read*,N,S do i=1,N if(get>=150.and.flg==0)then print'(A)',"buy hand" get=get-150 flg=1 else if(i==N)then print'(A)',"sell hand" else print'(A)',"click" get=get+1 end if end do end program y5003