C. Propagating tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Iahub likes trees very much. Recently he discovered an interesting tree named propagating tree. The tree consists of n n…