public class Demo {
public static void main(String[] args) {
for(int i =0; i <= Integer.parseInt("11111",2); i++){
String binaryString = Integer.toBinaryString(i);
while(binaryString.length()!=5){
binaryString = 0 + binaryString;
}
System.out.println(binaryString);
}
}
}