fork download
  1. program indexing;
  2.  
  3. var
  4. A, B, C : AnsiString;
  5. dimA, dimB,i, n :Longint;
  6. begin
  7. (*assign(input, 'input.txt'); reset(input);
  8.   assign(output, 'output.txt'); rewrite(output);*)
  9.  
  10. ReadLn(A);
  11.  
  12. ReadLn(B);
  13.  
  14. C := '';
  15.  
  16. dimA:=Length(A); dimB:=Length(B);
  17. i:=1;
  18. if (A[1]<>B[1]) and (dimA<>1) and (dimB<>1) then begin n:=ord(A[1]); C:=C+chr(n+1); end;
  19. writeln(C);
  20. end.
Success #stdin #stdout 0.01s 5296KB
stdin
abc
cw
stdout
b