The first line of input contains three positive integers: n (the number of directories other than the root directory), m (the number of files), and k (the desired path name length). The root directory has number 0, and all the remaining directories are numbered 1 through n. Files are numbered 1 through m. The second line contains the length s of the introduced symlink name (we don't care about the name itself, and assume it will not collide with anything else in the file system).
After that follow n lines describing the directories (other than the root directory) that exist in the file system. The i-th of those lines describes the directory number i and consists of two integers: Pi and Li. They specify that the directory number i has a name of length Li and its parent directory (i.e. the directory in which the i-th directory is directly contained) has number Pi. It is guaranteed that Pi<i.
Finally m lines follow with a description of the files in the file system. The j-th of those lines describes the file number j and consists of two integers: Pj and Lj. They specify that the file numberj has a name of length Lj and its parent directory has number Pj.
All files and directories will have names with positive length, and their absolute file paths will be at most k characters long.