public class Solution {

    public static volatile int numSeconds = 3;

    public static void main(String[] args) throws InterruptedException {
        RacingClock clock = new RacingClock();
        //write your code here
        Thread.sleep(3500);
        clock.interrupt();
    }

    public static class RacingClock extends Thread {
        public RacingClock() {
            start();

        }

        public void run() {
            //write your code here
            try{
                boolean isLessThanThree = (numSeconds <= 3);
                while (numSeconds > 0){

                    System.out.print(numSeconds + " ");
                    Thread.sleep(1000);
                    numSeconds--;

                }
                if (isLessThanThree){
                    System.out.print("Go!");
                }
            }
            catch (InterruptedException e) {
                System.out.print("Interrupted!");
            }
        }
    }
}