Track line numbers of each element