public abstract class CountingSender {
    private String prefix;
    private int counter;

    public CountingSender(String prefix){
        this.prefix = prefix;
    }
    public void Greet(String message){
        this.counter ++;
        this.write("%d: %s,%s".formatted(this.counter, this.prefix, message));
    }

    abstract void write(String message);
}
