def judge(hori, vert, cros, pat)
  datas = "hori,vert,cros".split(",")
  datas.each {|elem|
    list = Array.new
    last = elem == "cros" ? 1 : 2
    for i in 0..last
      eval("list = #{elem}[i].uniq")
      return true if (list[0] == pat) and (list.size == 1)
    end    
  }
  return false
end

lines = Array.new(3)
data = Array.new(3){ Array.new(3) }

for i in 0..2
  lines[i] = gets
end

dlist = Array.new(3)
dlist[0] = lines[0].scan(/.{3}/)
dlist[1] = lines[1].scan(/.{3}/)
dlist[2] = lines[2].scan(/.{3}/)

hRow = Array.new(3)
crs = Array.new(2){ Array.new }
for i in 0..dlist[0].length - 1
  # ?¨??????????
  hRow[0] = dlist[0][i].split("")
  hRow[1] = dlist[1][i].split("")
  hRow[2] = dlist[2][i].split("")
  # ????????????
  vRow = hRow.transpose # ??¢???
  # ??????
  crs[0].push(hRow[0][0])
  crs[0].push(hRow[1][1])
  crs[0].push(hRow[2][2])
  crs[1].push(hRow[0][2])
  crs[1].push(hRow[1][1])
  crs[1].push(hRow[2][0])

  if judge(hRow, vRow, crs, "o")
    puts "o"
  elsif judge(hRow, vRow, crs, "x")
    puts "x"
  else
    puts "d"
  end

  crs[0].clear
  crs[1].clear
end