// File: /workspace/github_cpp_makefile_star2_O1/kage08[P]RegexLibrary/REGEX2NFA.cpp
// Function: main
int main(){
  set<char> alphabet;
  string line;
  getline(cin,line);
  for(char c:line){
    if(!(c==' ' || c=='\n')) alphabet.insert(c);
  }
  cin>>line;
  string ln;
  for(char c:line) if(c!=' ') ln.append(string(1,c));
  line=ln;
  //cout<<line<<endl;
  line=addConcat(line,alphabet);
  //cout<<line<<endl;
  line=toPostFix(line,alphabet);
  //cout<<line<<endl;
  NFA C=makeNFA(line,alphabet);
  printNFA(C);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
leaq 0xb0(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movb $0x0, (%rax)
movq 0x3b70(%rip), %rdi      # 0x9fd8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %edx
movq 0x3b55(%rip), %rdi      # 0x9fd8
movq %rsp, %rsi
callq 0x2290
movq 0x8(%rsp), %r15
testq %r15, %r15
je 0x64cf
movq (%rsp), %r12
xorl %r13d, %r13d
leaq 0xa8(%rsp), %rbx
leaq 0x40(%rsp), %r14
movzbl (%r12,%r13), %eax
movb %al, 0x40(%rsp)
cmpl $0xa, %eax
je 0x64c7
cmpl $0x20, %eax
je 0x64c7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6962
incq %r13
cmpq %r13, %r15
jne 0x64a9
movq 0x3b02(%rip), %rdi      # 0x9fd8
movq %rsp, %rsi
callq 0x21f0
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x8(%rsp), %r13
testq %r13, %r13
je 0x6560
movq (%rsp), %r15
leaq 0x50(%rsp), %rbp
xorl %r12d, %r12d
leaq 0x40(%rsp), %rbx
leaq 0x20(%rsp), %r14
movb (%r15,%r12), %al
cmpb $0x20, %al
je 0x6558
movq %rbp, 0x40(%rsp)
movsbl %al, %edx
movl $0x1, %esi
movq %rbx, %rdi
callq 0x21c0
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %r14, %rdi
callq 0x2070
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6558
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
incq %r12
cmpq %r12, %r13
jne 0x6512
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x20c0
leaq 0x108(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x677a
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
leaq 0x108(%rsp), %rdx
callq 0x382b
movq %rsp, %rdi
leaq 0x40(%rsp), %rbx
movq %rbx, %rsi
callq 0x21e0
movq (%rbx), %rdi
leaq 0x50(%rsp), %r14
cmpq %r14, %rdi
je 0x65c1
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x108(%rsp), %rdi
callq 0x694e
leaq 0xd8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x677a
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
leaq 0xd8(%rsp), %rdx
callq 0x39e4
movq %rsp, %rdi
leaq 0x40(%rsp), %rbx
movq %rbx, %rsi
callq 0x21e0
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x661d
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0xd8(%rsp), %rdi
callq 0x694e
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
leaq 0xa8(%rsp), %rdx
callq 0x2e79
leaq 0x40(%rsp), %rdi
callq 0x33e5
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x6666
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
leaq 0x60(%rsp), %rdi
callq 0x4850
leaq 0x48(%rsp), %rdi
callq 0x46ce
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x6696
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x66b1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0xa8(%rsp), %rdi
callq 0x694e
xorl %eax, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x47c6
jmp 0x672e
jmp 0x670f
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
jmp 0x66fd
jmp 0x670f
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x694e
jmp 0x672e
jmp 0x670f
jmp 0x670f
jmp 0x670a
movq %rax, %rbx
jmp 0x674a
movq %rax, %rbx
jmp 0x672e
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x672e
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x674a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6765
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0xa8(%rsp), %rdi
callq 0x694e
movq %rbx, %rdi
callq 0x2270