Constructing strings uniquely is something entirely else. Your research gets reflected in your work. If the teacher is smart he can very easily deduce if the guy has done the work by himself or used ChatGPT.