// File: /workspace/github_cpp_makefile_star2_O3/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 0x3bc8(%rip), %rdi      # 0x9fd8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %edx
movq 0x3bad(%rip), %rdi      # 0x9fd8
movq %rsp, %rsi
callq 0x2290
movq 0x8(%rsp), %r15
testq %r15, %r15
je 0x6477
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 0x646f
cmpl $0x20, %eax
je 0x646f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x690a
incq %r13
cmpq %r13, %r15
jne 0x6451
movq 0x3b5a(%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 0x6508
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 0x6500
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 0x6500
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
incq %r12
cmpq %r12, %r13
jne 0x64ba
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x20c0
leaq 0x108(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x6722
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
leaq 0x108(%rsp), %rdx
callq 0x3817
movq %rsp, %rdi
leaq 0x40(%rsp), %rbx
movq %rbx, %rsi
callq 0x21e0
movq (%rbx), %rdi
leaq 0x50(%rsp), %r14
cmpq %r14, %rdi
je 0x6569
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x108(%rsp), %rdi
callq 0x68f6
leaq 0xd8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x6722
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
leaq 0xd8(%rsp), %rdx
callq 0x39bc
movq %rsp, %rdi
leaq 0x40(%rsp), %rbx
movq %rbx, %rsi
callq 0x21e0
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x65c5
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0xd8(%rsp), %rdi
callq 0x68f6
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
leaq 0xa8(%rsp), %rdx
callq 0x2e66
leaq 0x40(%rsp), %rdi
callq 0x33d2
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x660e
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
leaq 0x60(%rsp), %rdi
callq 0x47fa
leaq 0x48(%rsp), %rdi
callq 0x4664
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x663e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6659
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0xa8(%rsp), %rdi
callq 0x68f6
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 0x4770
jmp 0x66d6
jmp 0x66b7
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
jmp 0x66a5
jmp 0x66b7
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x68f6
jmp 0x66d6
jmp 0x66b7
jmp 0x66b7
jmp 0x66b2
movq %rax, %rbx
jmp 0x66f2
movq %rax, %rbx
jmp 0x66d6
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x66d6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x66f2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x670d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0xa8(%rsp), %rdi
callq 0x68f6
movq %rbx, %rdi
callq 0x2270