def unjfen(s)
    s.split(?/).map {|row| row.each_char.map {|c| c == ?b ? ?b : [?.] * c.to_i}.flatten}
end

def jfen(rows)
    rows.map {|row| row.join.gsub(/\.+/){|e| e.size}} * ?/
end

loop do
    a = unjfen(gets.chomp)
    break if $_ =~ /#/
    i1, j1, i2, j2 = gets.split.map(&:to_i)
    a[i1-1][j1-1] = ?.
    a[i2-1][j2-1] = ?b
    puts jfen(a)
end