const
vowels = ['а','у','о','ы','и','э','я','ю','ё','е'];
type TStudent = Record
FIO: string;
SrBall: real;
end;
var
f1,f2: text;
st1,st2,Name: string;
n,i,j,l,x: integer;
StudCount,DisCount: byte;
Student : array of TStudent;
BEGIN
n := 0;
l := 0;
StudCount := 0;
Name := '';
Assign(f1,'Список группы.txt');
Assign(f2,'Для отчеств.txt');
Reset(f1);
While not EOF(f1) do //подсчет количества студентов
begin
Readln(f1,st1);
inc(StudCount);
end;
SetLength(Student,StudCount);
Close(f1);
//DisCount := random(8,15);
Reset(f2);
While (not EOF(f2)) do //подсчет количества возможных отчеств
begin
Readln(f2,st2);
inc(n);
end;
Close(f2);
Reset(f1);
While not(EOF(f1)) do
begin
Readln(f1,st1);
l := length(st1);
if (st1[l] in vowels) then
begin
i := 0;
x := random(1,n - 1);
While (i < x) do
begin
Reset(f2);
Readln(f2,st2);
st2 := st2 + 'овна ';
Student[j].FIO := st1 + ' ' + st2;
Close(f2);
inc(i);
end;
end;
if not (st1[l] in vowels) then
begin
i := 0;
x := random(1,n - 1);
While (i < x) do
begin
Reset(f2);
Readln(f2,st2);
st2 := st2 + 'ович ';
Student[j].FIO := st1 + ' ' + st2;
Close(f2);
inc(i);
end;
end;
inc(j);
end;
Close(f1);
for j := 0 to StudCount - 1 do
Writeln(Student[j].FIO);
END.