import java.util.*;
public class Main {
private class Node {
int data;
Node left;
Node right;
public Node(int data,Node left,Node right) {
// TODO Auto-generated constructor stub
this.data = data;
this.left = left;
this.right = right;
}
}
private Node root = null;
static int maxLevel =0;
public void LeftView() {
LeftView(this.root,1);
}
private void LeftView(Node node , int level) {
if(node== null) {
return;
}
if(maxLevel < level) {
System.out.print(" " + node.data);
maxLevel = level;
}
LeftView(node.left,level+1);
LeftView(node.right,level+1);
}
public static void main(String args[]) {
Main tree = new Main();
tree.LeftView();
}
}