public void run() {
        while (true) {
            semaphore.take();
            System.out.print(number);
            semaphore.give();

            try {
                sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }