a=gets.strip i,j=gets.strip.split.map &:to_i a[i],a[j]=a[j],a[i] puts a