Assign UIDs for IMs and Beams