CF846E Chemistry in Berland
Description
Igor is a post-graduate student of chemistry faculty in Berland State University (BerSU). He needs to conduct a complicated experiment to write his thesis, but laboratory of BerSU doesn't contain all the materials required for this experiment.
Fortunately, chemical laws allow material transformations (yes, chemistry in Berland differs from ours). But the rules of transformation are a bit strange.
Berland chemists are aware of $ n $ materials, numbered in the order they were discovered. Each material can be transformed into some other material (or vice versa). Formally, for each $ i $ $ (2
Input Format
N/A
Output Format
N/A