**Compilation/Execution Result:**

Write a function to detect if two trees are isomorphic. Two trees are called isomorphic if one of them can be obtained from other by a series of flips, i.e. by swapping left and right children of a number of nodes. Any number of nodes at any level can have their children swapped. Two empty trees are isomorphic.

**Input:**

First line consists of T test cases. First line of every test case consists of N, denoting number of Node in tree. Second and third line of every test case consists of N, nodes of binary tree.

**Output:**

Single line output, return the boolean value true if "Yes" else "No".

**Constraints:**

1<=T<=100

1<=N<=100

**Example:
Input:**

2

3

1 2 L 1 3 R 2 4 L

1 3 L 1 2 R 3 4 R

3

1 2 L 1 3 R 2 4 L

1 3 L 1 2 R 2 4 R

No

Yes

Author: saksham seth

SANJAY5797 | 145 |

Himanshusinghchauhan | 120 |

iharshitmittal | 106 |

Lam Ngoc Pham | 105 |

rishusinha | 103 |

Shashank_Pathak | 652 |

dark_knights | 560 |

surbhi_7 | 556 |

SANJAY5797 | 453 |

Vasudha Gupta | 377 |

akhayrutdinov | 4161 |

sanjay05 | 3633 |

Quandray | 2833 |

Ibrahim Nash | 2524 |

Michael Riegger | 2308 |