public class Main {
public static void main(String[] args) {
final String ZERO = "00000";
String subStr="";
System.out.println(ZERO);
for(int i=1;i<32;i++) {
String zeroString="";
int tmp=i;
while(tmp!=1) {
zeroString =tmp%2+zeroString;
tmp = tmp/2;
}
zeroString = 1+zeroString;
subStr = ZERO.substring(0,5-zeroString.length())+zeroString;
System.out.println(subStr);
}
}
}