# Binary Tree

#######################################################################################################################
#
#   Given a binary tree which has T nodes, you need to find the diameter of that binary tree. The diameter of a
#   tree is the number of nodes on the longest path between two leaves in the tree.
#
#   Input:
#   First line contains two integers, T and X, number of nodes in the tree and value of the root.
#   Next 2×(T−1) lines contain details of nodes.
#   Each detail of node contains two lines. First lines contains a string and second line contains an integer,
#   which denotes the path of the node and the value of the node respectively.
#   String consists of only L or R. L denotes left child and R denotes right child.
#   (Look at the sample explanation for more details)
#
#   Output:
#   Print the diameter of the binary tree.
#
#   Constraints:
#   1 <= T <= 20
#   1 <= valueofnodes <= 20
#
#   SAMPLE INPUT
#   5 1
#   L
#   2
#   R
#   3
#   LL
#   4
#   LR
#   5
#
#   SAMPLE OUTPUT
#   4
#
#######################################################################################################################
