Conjugation in Real Life In @Adám's Dyalog APL Extended, the ⍢ (under) operator means conjugation:  apply one function, then a second function, then the inverse of the first. It's fun to think of real-life actions in terms of conjugation:


  A problem is transformed by g into another domain where it more
  readily solved by f , and then transformed back into the original
  domain. An example from real life is “under anesthetics”:

apply anesthetics
    perform surgery
wake up from anesthetics


Challenge

The inverse of a line g is "un" prepended to g, and vice versa. Define any line between s and its inverse, in that order, as being "under" s. For each line f in input in order:


If f and its inverse both occur, do nothing
If f is not "under" any other action, print f
If f is "under" a line g, print f + " under " + g where + is concatenation.


Input

A nonempty multiline string, or list of strings, etc., consisting of spaces and lowercase letters (you may instead use uppercase). Exactly one line will begin with "un"; and it will be the inverse of some other line. No line will be empty.

Output

Output in the same format you took input in, or as allowed by Standard I/O.

Test cases:

Input:
apply anesthetics
perform surgery
unapply anesthetics

Output:
perform surgery under apply anesthetics


Input:
unite asia
establish the silk road
ite asia

Output:
establish the silk road under unite asia


Input:
desire a book
walk to store
take the book
pay for the book
unwalk to store
read the book

Output:
desire a book
take the book under walk to store
pay for the book under walk to store
read the book


Input:
drink excessively
undrink excessively

Output:
[empty string]
Brachylog, 90 bytes

;Ṡ{hhH↰₂gB&amp;hb~c[A,B,C]&amp;tT;C↔↰U∧" under ",H,T;A↔↰,U|tT&amp;hh,TgJ&amp;hb;T↰Q∧J,Q|h}
~↰₃|↰₃
∧"un";?c


I made this while being under the impression that this could be recursive and multiple unders could be stacked. Probably not optimized. Also as this is bracylog, plumbing takes quite some bytes.

Try it online!