public static void main(String[] args) {
        boolean timeToExit = false;
        do {
            System.out.println("Выберите действие: ");
            System.out.println("1. Create");
            System.out.println("2. Link");
            System.out.println("3. Unlink");
            System.out.println("4. Message");
            System.out.println("5. Print");
            System.out.println("6. Exit");
            try {
                int choice = Integer.parseInt(jin.nextLine());
                switch (choice) {
                    case 1: {
                        create();
                        break;
                    }
                    case 2: {
                        link();
                        break;
                    }
                    case 3: {
                        unlink();
                        break;
                    }
                    case 4: {
                        message();
                        break;
                    }
                    case 5: {
                        print();
                        break;
                    }
                    case 6: {
                        timeToExit = true;
                        break;
                    }
                }
            } catch (NumberFormatException e) {
                System.out.println("Неверный ввод");
            }
        } while (!timeToExit);
    }