Help Vasya
Vasya is organizing another contest for the spring All-Berland programming camp. As a fan of lively gatherings and with the weather encouraging such activities, he finds himself with limited time for preparation. To make the most of his time, he needs to quickly navigate from one directory to another. Vasya is so accustomed to his favorite file manager, "Near Commandir," that using any other software would slow him down significantly. This manager allows him to perform several basic operations: move up or down one position in the list of files and subdirectories, enter the currently highlighted subdirectory, or move up one level in the directory tree if it's the parent directory. Each of these operations takes Vasya exactly **1** second. To expedite his navigation, Vasya can also reorder the files and subdirectories in the current directory, which takes **t** seconds. Files can be sorted by name, size, or last modification time. For the latter two, files with the same size or time are sorted by name. File and directory names within the same directory are unique. Vasya wants to determine how much time it will take to reach the desired file from his current location in the file system tree. Initially, files in the current directory are sorted by name, and when entering a new directory, they are also sorted by name without any additional time cost for Vasya.
Input
The file system is represented as a tree with a specified root. The first line contains **n** and **t** (**1** ≤ **n** ≤ **100000**, **0** ≤ **t** ≤ **10**) — the size of the tree and the time required to change the order of files. The following **n** lines each contain **4** values: **p_i**, **name_i**, **fsize_i**, **date_i** (**1** ≤ **i** ≤ **n**. **p_i** is the ancestor node number; if it is **-1**, this node is the root. **name_i** is the file name, a non-empty string of up to **10** Latin letters. **fsize_i** is the file size, **0** ≤ **fsize_i** ≤ **10000**. **date_i** is the last modification time, **0** ≤ **date_i** ≤ **10000**). The last line contains two numbers **0** ≤ **s**, **f** < **n** — the node number where Vasya currently is and the node number he needs to reach. Nodes are numbered in the order they appear in the input.
Output
Output a single integer representing the minimum number of seconds required.