Find a binary tree's deepest node Write a program that takes a binary tree as input, and outputs the deepest node and its depth. If there is a tie, print all involved nodes as well as their depths. Each node is represented as:

T(x,x)

T(x)

T

where T is the identifier of one or more alphanumeric characters and each x is another node.

Here's a simple definition of a binary tree:


At the head of a binary tree is a node.
A node in a binary tree has at most two children.


For example, the input A(B(C,D(E))) (below) would output 3:E.



While the following tree is a three-way tie between 5, 11, and 4, and their depth is also 3 (starting from 0):

The input 2(7(2,6(5,11)),5(9(4))) (below) would output 3:5,11,4.



This is code golf, so the shortest code measured in bytes wins.
CJam, 49 47

0q')/{'(/):U;,+:TW&gt;{T:W];}*TW={U]',*}*T(}/;W':@


&nbsp;

0                 " Push 0 ";
q                 " Read the whole input ";
')/               " Split the input by ')' ";
{                 " For each item ";
  '(/             " Split by '(' ";
  )               " Extract the last item of the array ";
  :U;             " Assign the result to U, and discard it ";
  ,               " Get the array length ";
  +               " Add the top two items of the stack, which are the array length and the number initialized to 0 ";
  :T              " Assign the result to T ";
  W&gt;{             " If T&gt;W, while W is always initialized to -1 ";
    T:W];         " Set T to W, and empty the stack ";
  }*
  TW={            " If T==W ";
    U]',*         " Push U and add a ',' between everything in the stack, if there were more than one ";
  }*
  T(              " Push T and decrease by one ";
}/
;                 " Discard the top item, which should be now -1 ";
W                 " Push W ";
':                " Push ':' ";
@                 " Rotate the 3rd item to the top ";