In a 5-day week there are 30 periods (6*5). There are 5 subjects so we can them A, B, C, D, E.
Mon: ABCDEA
Tue: BCDEAB
Wed: CDEABC
Thu: DEABCD
Fri: EABCDE
The first and last periods of each day are for the same subject, so that in a week each of the 5 subjects is repeated so that there are 6 periods for each subject in a week.