INPUT "vvedite 1 slovo ", a$
INPUT "vvedite 2 slovo ", b$
FOR i = 1 TO LEN(a$)
FOR j = 1 TO LEN(a$)
IF MID$(a$, i, 1) = MID$(a$, j, 1) THEN k = k + 1
NEXT
IF k = 1 THEN a1$ = a1$ + MID$(a$, i, 1)
k = 0
NEXT
FOR i = 1 TO LEN(b$)
FOR j = 1 TO LEN(b$)
IF MID$(b$, i, 1) = MID$(b$, j, 1) THEN k = k + 1
NEXT
IF k = 1 THEN b1$ = b1$ + MID$(b$, i, 1)
k = 0
NEXT
FOR i = 1 TO LEN(a1$)
kol = 0
FOR j = 1 TO LEN(b1$)
IF MID$(a1$, i, 1) = MID$(b1$, j, 1) THEN kol = kol + 1
NEXT
IF kol = 1 THEN PRINT MID$(a1$, i, 1)
NEXT