public class Solution {
    public static volatile int numSeconds = 3;

    public static void main(String[] args) throws InterruptedException {
        RacingClock clock = new RacingClock();
        Thread.sleep(3500);
        System.out.print("Марш!");
        clock.interrupt();//add your code here - добавь код тут
    }

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

        public void run() {
            while (true) {
                System.out.print(numSeconds+" ");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }


                if (Thread.interrupted()){
                    System.out.print("Прервано!");
                    break;}
                else System.out.println("Not interrupt");
                numSeconds--;//add your code here - добавь код тут
                }
            }
        }
    }