num = gets.to_i num.times do input = gets.to_i if input % 40 == 0 puts "ikisugi" elsif input % 10 == 0 puts "sugi" elsif input % 8 == 0 puts "iki" else puts input / 3 end end # your code goes here