#! ruby # yukicoder My Practice # author: Leonardone @ NEETSDKASU ############################################################ def gs() gets.chomp end def gi() gets.to_i end def gf() gets.to_f end def gss() gs.split end def gis() gss.map(&:to_i) end def gfs() gss.map(&:to_f) end def nmapf(n,f) n.times.map{ __send__ f } end def ngs(n) nmapf n,:gs end def ngi(n) nmapf n,:gi end def ngss(n) nmapf n,:gss end def ngis(n) nmapf n,:gis end def arr2d(h,w,v=0) h.times.map{[v] * w} end def for2p(hr,wr,&pr) hr.each{|i|wr.each{|j| yield(i,j)}} end def nsum(n) n * (n + 1) / 2 end def vcount(d,r=Hash.new(0)) d.inject(r){|r,e| r[e]+=1;r} end ############################################################ n, x = gis a = gis.each_with_index.to_a.sort_by{|i,j|-i} m = {0 => []} def tos(a,r) s = "" a.each_with_index do |v,i| if r.include? i s << "o" else s << "x" end end s end a.each do |v,i| m.keys.sort.reverse_each do |k| m[k + v] = m[k] + [i] if k + v == x puts tos(a, m[k] + [i]) exit end end end if !m.key?(x) puts "No" exit end puts tos(a, m[x])