n = gets
num = [0]
until n.nil?
 nn = n.chomp
 x = nn.split("")

 x.each do |k|
  num << k
 end
 maru = num.each_with_index.select{|e, i| e == "o"}.map{|e| e[1]}
 batu = num.each_with_index.select{|e, i| e == "x"}.map{|e| e[1]}
  if maru.include?(2) && maru.include?(1) && maru.include?(3)
   puts "o"
  elsif maru.include?(4) && maru.include?(1) && maru.include?(7)
   puts "o"
  elsif maru.include?(6) && maru.include?(3) && maru.include?(9)
   puts "o"
  elsif maru.include?(8) && maru.include?(7) && maru.include?(9)
   puts "o"
  elsif maru.include?(5) && maru.include?(2) && maru.include?(8)
   puts "o"
  elsif maru.include?(5) && maru.include?(1) && maru.include?(9)
   puts "o"
  elsif maru.include?(5) && maru.include?(3) && maru.include?(7)
   puts "o"
  elsif maru.include?(5) && maru.include?(4) && maru.include?(6)
   puts "o"
  elsif batu.include?(2) && batu.include?(1) && batu.include?(3)
   puts "x"
  elsif batu.include?(4) && batu.include?(1) && batu.include?(7)
   puts "x"
  elsif batu.include?(6) && batu.include?(3) && batu.include?(9)
   puts "x"
  elsif batu.include?(8) && batu.include?(7) && batu.include?(9)
   puts "x"
  elsif batu.include?(5) && batu.include?(2) && batu.include?(8)
   puts "x"
  elsif batu.include?(5) && batu.include?(1) && batu.include?(9)
   puts "x"
  elsif batu.include?(5) && batu.include?(3) && batu.include?(7)
   puts "x"
  elsif batu.include?(5) && batu.include?(4) && batu.include?(6)
   puts "x"
  else
   puts "d"
  end
  
 n = gets
 num = [0]
end
