c,n,m = gets.split n,m = n.to_i, m.to_i n < m ? (a = m)&&(b = n) : (a = n)&&(b = m) n == m ? c.slice!(a) : c.slice!(a) && c.slice!(b) puts c