showItem :: Item -> String
showItem (nt,xs,ys) =
  show nt ++ " -> " ++
  intercalate " " (map show (reverse xs)) ++ " . " ++
  intercalate " " (map show ys)
showItem :: Item -> String
showItem (nt,xs,ys) =
  show nt ++ " -> " ++
  intercalate " " (map show (reverse xs)) ++ " . " ++
  intercalate " " (map show ys)
showItem (nt,xs,ys) =
  show nt ++ " -> " ++
  intercalate " " (map show (reverse xs)) ++ " . " ++
  intercalate " " (map show ys)