
def find(target, front, east, north, west, south, rear)
  current = [front, east, north, west, south, rear].sort!
  
  return nil if target[0] < current[0] || target[1] < current[1] ||
      target[2] < current[2] || target[3] < current[3] ||
      target[4] < current[4] || target[5] < current[5] ||
      target[0]+target[1]+target[2]+target[3]+target[4]-current[0]-current[1]-current[2]-current[3]-current[4]+1 < target[5]-current[5]
  
  return '' if target == current

  if result = find(target, west, front, north, rear, south, east + 1)
    return 'E' + result
  end
  if result = find(target, south, east, front, west, rear, north + 1)
    return 'N' + result
  end
  if result = find(target, north, east, rear, west, front, south + 1)
    return 'S' + result
  end
  if result = find(target, east, rear, north, front, south, west + 1)
    return 'W' + result
  end

  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

  if result = find(target, 0, 0, 0, 1, 0, 1)
    return 'EE' + 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