#!/usr/koeki/bin/ruby
# -*- coding: utf-8 -*-
print "aaaaaaaaaaaaaaaaaaaaaaaa"
kobushi = 0

print"じゃんけんしようぜ\n"

print"最初はグーじゃんけん(1:グー2:チョキ3:バー)\n"
kobusi = gets.chomp!.to_i

srand
cpu = rand(3) + 1

if kobusi == 1
  if cpu == 1
    print"ぽん\n"
    print"グー\n"
    sleep(2)
    print"グー\n"
    sleep(1)
    print"あいこー\n"
  elsif cpu == 2
    print"ぽん\n"
    print"グー\n"
    sleep(2)
    print"チョキ\n"
    sleep(1)
    print"キミのかちー\n"
  elsif cpu == 3
    print"ぽん\n"
    print"グー\n"
    sleep(2)
    print"パー\n"
    sleep(1)
    print"キミのまけー\n"
  end
elsif kobusi == 2
  if cpu == 1
    print"ぽん\n"
    print"チョキ\n"
    sleep(2)
    print"グー\n"
    sleep(1)
    print"キミのまけー\n"
  elsif cpu == 2
    print"ぽん\n"
    print"チョキ\n"
    sleep(2)
    print"チョキ\n"
    sleep(1)
    print"あいこー\n"
  elsif cpu == 3
    print"ぽん\n"
    print"チョキ\n"
    sleep(2)
    print"パー\n"
    sleep(1)
    print"キミのかちー\n"
  end
elsif kobusi == 3
  if cpu == 1
    print"ぽん\n"
    print"パー\n"
    sleep(2)
    print"グー\n"
    sleep(1)
    print"キミのかちー\n"
  elsif cpu == 2
    print"ぽん\n"
    print"パー\n"
    sleep(2)
    print"チョキ\n"
    sleep(1)
    print"キミのまけー\n"
  elsif pcu == 3
    print"ぽん\n"
    print"パー\n"
    sleep(2)
    print"パー\n"
    sleep(1)
    print"あいこー\n"
  end
end
