import java.util.function.*;
import java.util.concurrent.atomic.AtomicInteger;
class Main {
public static void main(String[] args) {
Supplier<IntSupplier> generateIntGenerator = () -> {
var i = new AtomicInteger();
return i::getAndIncrement;
};
var generator = generateIntGenerator.get();
System.out.println(generator.getAsInt());
System.out.println(generator.getAsInt());
System.out.println(generator.getAsInt());
System.out.println(generator.getAsInt());
}
}