about summary refs log tree commit diff
path: root/others/volume1/113.pas
blob: 64d2af5f0de309f574310ae1b4ae7b6aa1ca8d7a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const
  cond: array[0..2] of set of char = (
    ['A', 'H', 'I', 'M', 'O', 'T', 'U', 'V', 'W', 'X', 'Y'],
    ['B', 'C', 'D', 'E', 'H', 'I', 'K', 'O', 'X'],
    ['H', 'I', 'N', 'O', 'S', 'X', 'Y']
  );

var
  s: ansistring;
  c: char;
  b: array[0..2] of boolean;
  i: int8;

begin
  readln(s);
  for i := 0 to 2 do
    b[i] := true;
  for c in s do
    for i := 0 to 2 do
      b[i] := b[i] and (c in cond[i]);
  for i := 0 to 2 do
    if b[i] then
      write('+')
    else
      write('-');
  writeln
end.
end.