p_num which = do
  s <- getInput
  case which s of
    [(n, s')] -> n <$ setInput s'
    _         -> empty
p_num which = do
  s <- getInput
  case which s of
    [(n, s')] -> n <$ setInput s'
    _         -> empty
p_num which = do
  s <- getInput
  case which s of
    [(n, s')] -> n <$ setInput s'
    _         -> empty