
def find(target, stack)
  front, east, north, west, south, rear, path = stack.pop
  current = [front, east, north, west, south, rear].sort!

  diff = (0...6).map{|i| target[i] - current[i]}.sort!

  return nil if diff[0] < 0
  return path if diff[5] == 0

  return nil if diff[0]+diff[1]+diff[2]+diff[3]+diff[4]+1 < diff[5]
  if diff[0]+diff[1]+diff[2]+diff[3]+diff[4]+1 == diff[5]
    return nil if current.all?{|i| !target.include?(i)}
  end

  stack << [east, rear, north, front, south, west + 1, path + 'W']
  stack << [north, east, rear, west, front, south + 1, path + 'S']
  stack << [south, east, front, west, rear, north + 1, path + 'N']
  stack << [west, front, north, rear, south, east + 1, path + 'E']

  nil
end

def find_first(target)

  if target == [0, 0, 0, 0, 0, 0]
    return ''
  elsif target == [0, 0, 0, 0, 0, 1]
    return 'E'
  end

  stack = [[0, 0, 0, 1, 0, 1, 'EE']]
  until stack.empty?
    result = find(target, stack)
    return result if result
  end
  
  nil
end

loop do
  target = STDIN.gets.split.map!(&:to_i)
  break if target.inject(&:+) == 0
  p, q = STDIN.gets.split.map!(&:to_i)
  
  result = find_first(target)
  puts result ? result[p-1...q] : 'impossible'
end