private void optimizeMondayTimeTableForIIIAndIVGymnasium() {
//        mondayTimeTable = new LinkedHashMap<>();
//        tuesdayTimeTable = new LinkedHashMap<>();
//        wednesdayTimeTable = new LinkedHashMap<>();
//        thursdayTimeTable = new LinkedHashMap<>();
//        fridayTimeTable = new LinkedHashMap<>();
        List<LinkedHashMap> daysTimeTablesForItr = addDaysTimeTablesForIteration();
//        System.out.println("days time table in III and IV: " + daysTimeTablesForItr);

        LinkedHashMap<String, String> teachersTimeTable;
        HashMap<String, Teacher> teachersMapForDeletion = copyTeacherForDeletion();

        for (int lectureNumber = 1; lectureNumber <= properties.getHoursPerDay(); lectureNumber++) {
//            System.out.println("--------------Lecture-----------------");
//            System.out.println("teachersListOfIIIAndIV: " + teachersListOfIIIAndIVForOptm);
            for (String teacherName : teachersListOfIIIAndIVForOptm) {
//                System.out.println("--------------Teacher-----------------");
                for (LinkedHashMap dayTimeTable : daysTimeTablesForItr) {
//                    System.out.println("-----------------Day-------------");
//                     System.out.println("lecture number: " + lectureNumber);
//                    System.out.println("daytimetable: " + dayTimeTable);
                    teachersTimeTable = getTeachersTimeTable(teacherName, dayTimeTable);
                    Teacher teacher = teachersMapForDeletion.get(teacherName);
                    List<Group> teachersGroups = teacher.getTeachersGroups();

                    int teachersGroupsTotal = teachersGroups.size();
//                    System.out.println("teachersGroupsTotal: " + teachersGroupsTotal);

                    if (teachersGroupsTotal == 0) {
//                        System.out.println("Tuscia");
                        teachersTimeTable.put(String.valueOf(lectureNumber), lectureNumber + ": -----");//Add group, because all the groups for teacher was added already
//                        System.out.println("add empty at the end");
                        continue;
                    }

                    int counter = 0;
                    counter = countThatThereIsIIIAndIVGymnGroups(teachersGroups, counter);

                    if (counter == 0) {
                        teachersTimeTable.put(String.valueOf(lectureNumber), lectureNumber + ": -----");//Add group, because all the groups for teacher was added already
                        continue;
                    }

                    Group group = getRandomGroup(teachersGroups, teachersGroupsTotal);

                    while (group == null || group.isIiGymnasiumGroup() || group.isiGymnasiumGroup()) {
                        group = getRandomGroup(teachersGroups, teachersGroupsTotal);
                    }

                    boolean isGroupAllowedToAdd = isMandatoryConditionsMet(teacher, teachersGroups, group, lectureNumber, dayTimeTable);
//                    System.out.println("Grupe idejimui: " + group);
//                    System.out.println("isGroupAllowedToAdd: " + isGroupAllowedToAdd);
                    if (isGroupAllowedToAdd) {
//                        System.out.println("Mokytojas: " + teacherName);
//                        System.out.println("Grupe, kai galima deti ja: " + group);
                        addGroupToTeachersTimeTable(group, teachersTimeTable, lectureNumber, teachersGroups);
                    } else {
                        teachersTimeTable.put(String.valueOf(lectureNumber), lectureNumber + ": -----");
                    }
                }
            }
        }
    }