function rs(ds:char): integer; var с: char; i: integer; begin i:= 1; for c:= 'a' to 'z' do if c = ds then Result:= i else inc(i); end;