tactus 0.31.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. tactus/__init__.py +49 -0
  2. tactus/adapters/__init__.py +9 -0
  3. tactus/adapters/broker_log.py +76 -0
  4. tactus/adapters/cli_hitl.py +189 -0
  5. tactus/adapters/cli_log.py +223 -0
  6. tactus/adapters/cost_collector_log.py +56 -0
  7. tactus/adapters/file_storage.py +367 -0
  8. tactus/adapters/http_callback_log.py +109 -0
  9. tactus/adapters/ide_log.py +71 -0
  10. tactus/adapters/lua_tools.py +336 -0
  11. tactus/adapters/mcp.py +289 -0
  12. tactus/adapters/mcp_manager.py +196 -0
  13. tactus/adapters/memory.py +53 -0
  14. tactus/adapters/plugins.py +419 -0
  15. tactus/backends/http_backend.py +58 -0
  16. tactus/backends/model_backend.py +35 -0
  17. tactus/backends/pytorch_backend.py +110 -0
  18. tactus/broker/__init__.py +12 -0
  19. tactus/broker/client.py +247 -0
  20. tactus/broker/protocol.py +183 -0
  21. tactus/broker/server.py +1123 -0
  22. tactus/broker/stdio.py +12 -0
  23. tactus/cli/__init__.py +7 -0
  24. tactus/cli/app.py +2245 -0
  25. tactus/cli/commands/__init__.py +0 -0
  26. tactus/core/__init__.py +32 -0
  27. tactus/core/config_manager.py +790 -0
  28. tactus/core/dependencies/__init__.py +14 -0
  29. tactus/core/dependencies/registry.py +180 -0
  30. tactus/core/dsl_stubs.py +2117 -0
  31. tactus/core/exceptions.py +66 -0
  32. tactus/core/execution_context.py +480 -0
  33. tactus/core/lua_sandbox.py +508 -0
  34. tactus/core/message_history_manager.py +236 -0
  35. tactus/core/mocking.py +286 -0
  36. tactus/core/output_validator.py +291 -0
  37. tactus/core/registry.py +499 -0
  38. tactus/core/runtime.py +2907 -0
  39. tactus/core/template_resolver.py +142 -0
  40. tactus/core/yaml_parser.py +301 -0
  41. tactus/docker/Dockerfile +61 -0
  42. tactus/docker/entrypoint.sh +69 -0
  43. tactus/dspy/__init__.py +39 -0
  44. tactus/dspy/agent.py +1144 -0
  45. tactus/dspy/broker_lm.py +181 -0
  46. tactus/dspy/config.py +212 -0
  47. tactus/dspy/history.py +196 -0
  48. tactus/dspy/module.py +405 -0
  49. tactus/dspy/prediction.py +318 -0
  50. tactus/dspy/signature.py +185 -0
  51. tactus/formatting/__init__.py +7 -0
  52. tactus/formatting/formatter.py +437 -0
  53. tactus/ide/__init__.py +9 -0
  54. tactus/ide/coding_assistant.py +343 -0
  55. tactus/ide/server.py +2223 -0
  56. tactus/primitives/__init__.py +49 -0
  57. tactus/primitives/control.py +168 -0
  58. tactus/primitives/file.py +229 -0
  59. tactus/primitives/handles.py +378 -0
  60. tactus/primitives/host.py +94 -0
  61. tactus/primitives/human.py +342 -0
  62. tactus/primitives/json.py +189 -0
  63. tactus/primitives/log.py +187 -0
  64. tactus/primitives/message_history.py +157 -0
  65. tactus/primitives/model.py +163 -0
  66. tactus/primitives/procedure.py +564 -0
  67. tactus/primitives/procedure_callable.py +318 -0
  68. tactus/primitives/retry.py +155 -0
  69. tactus/primitives/session.py +152 -0
  70. tactus/primitives/state.py +182 -0
  71. tactus/primitives/step.py +209 -0
  72. tactus/primitives/system.py +93 -0
  73. tactus/primitives/tool.py +375 -0
  74. tactus/primitives/tool_handle.py +279 -0
  75. tactus/primitives/toolset.py +229 -0
  76. tactus/protocols/__init__.py +38 -0
  77. tactus/protocols/chat_recorder.py +81 -0
  78. tactus/protocols/config.py +97 -0
  79. tactus/protocols/cost.py +31 -0
  80. tactus/protocols/hitl.py +71 -0
  81. tactus/protocols/log_handler.py +27 -0
  82. tactus/protocols/models.py +355 -0
  83. tactus/protocols/result.py +33 -0
  84. tactus/protocols/storage.py +90 -0
  85. tactus/providers/__init__.py +13 -0
  86. tactus/providers/base.py +92 -0
  87. tactus/providers/bedrock.py +117 -0
  88. tactus/providers/google.py +105 -0
  89. tactus/providers/openai.py +98 -0
  90. tactus/sandbox/__init__.py +63 -0
  91. tactus/sandbox/config.py +171 -0
  92. tactus/sandbox/container_runner.py +1099 -0
  93. tactus/sandbox/docker_manager.py +433 -0
  94. tactus/sandbox/entrypoint.py +227 -0
  95. tactus/sandbox/protocol.py +213 -0
  96. tactus/stdlib/__init__.py +10 -0
  97. tactus/stdlib/io/__init__.py +13 -0
  98. tactus/stdlib/io/csv.py +88 -0
  99. tactus/stdlib/io/excel.py +136 -0
  100. tactus/stdlib/io/file.py +90 -0
  101. tactus/stdlib/io/fs.py +154 -0
  102. tactus/stdlib/io/hdf5.py +121 -0
  103. tactus/stdlib/io/json.py +109 -0
  104. tactus/stdlib/io/parquet.py +83 -0
  105. tactus/stdlib/io/tsv.py +88 -0
  106. tactus/stdlib/loader.py +274 -0
  107. tactus/stdlib/tac/tactus/tools/done.tac +33 -0
  108. tactus/stdlib/tac/tactus/tools/log.tac +50 -0
  109. tactus/testing/README.md +273 -0
  110. tactus/testing/__init__.py +61 -0
  111. tactus/testing/behave_integration.py +380 -0
  112. tactus/testing/context.py +486 -0
  113. tactus/testing/eval_models.py +114 -0
  114. tactus/testing/evaluation_runner.py +222 -0
  115. tactus/testing/evaluators.py +634 -0
  116. tactus/testing/events.py +94 -0
  117. tactus/testing/gherkin_parser.py +134 -0
  118. tactus/testing/mock_agent.py +315 -0
  119. tactus/testing/mock_dependencies.py +234 -0
  120. tactus/testing/mock_hitl.py +171 -0
  121. tactus/testing/mock_registry.py +168 -0
  122. tactus/testing/mock_tools.py +133 -0
  123. tactus/testing/models.py +115 -0
  124. tactus/testing/pydantic_eval_runner.py +508 -0
  125. tactus/testing/steps/__init__.py +13 -0
  126. tactus/testing/steps/builtin.py +902 -0
  127. tactus/testing/steps/custom.py +69 -0
  128. tactus/testing/steps/registry.py +68 -0
  129. tactus/testing/test_runner.py +489 -0
  130. tactus/tracing/__init__.py +5 -0
  131. tactus/tracing/trace_manager.py +417 -0
  132. tactus/utils/__init__.py +1 -0
  133. tactus/utils/cost_calculator.py +72 -0
  134. tactus/utils/model_pricing.py +132 -0
  135. tactus/utils/safe_file_library.py +502 -0
  136. tactus/utils/safe_libraries.py +234 -0
  137. tactus/validation/LuaLexerBase.py +66 -0
  138. tactus/validation/LuaParserBase.py +23 -0
  139. tactus/validation/README.md +224 -0
  140. tactus/validation/__init__.py +7 -0
  141. tactus/validation/error_listener.py +21 -0
  142. tactus/validation/generated/LuaLexer.interp +231 -0
  143. tactus/validation/generated/LuaLexer.py +5548 -0
  144. tactus/validation/generated/LuaLexer.tokens +124 -0
  145. tactus/validation/generated/LuaLexerBase.py +66 -0
  146. tactus/validation/generated/LuaParser.interp +173 -0
  147. tactus/validation/generated/LuaParser.py +6439 -0
  148. tactus/validation/generated/LuaParser.tokens +124 -0
  149. tactus/validation/generated/LuaParserBase.py +23 -0
  150. tactus/validation/generated/LuaParserVisitor.py +118 -0
  151. tactus/validation/generated/__init__.py +7 -0
  152. tactus/validation/grammar/LuaLexer.g4 +123 -0
  153. tactus/validation/grammar/LuaParser.g4 +178 -0
  154. tactus/validation/semantic_visitor.py +817 -0
  155. tactus/validation/validator.py +157 -0
  156. tactus-0.31.2.dist-info/METADATA +1809 -0
  157. tactus-0.31.2.dist-info/RECORD +160 -0
  158. tactus-0.31.2.dist-info/WHEEL +4 -0
  159. tactus-0.31.2.dist-info/entry_points.txt +2 -0
  160. tactus-0.31.2.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,124 @@
1
+ SEMI=1
2
+ EQ=2
3
+ BREAK=3
4
+ GOTO=4
5
+ DO=5
6
+ END=6
7
+ WHILE=7
8
+ REPEAT=8
9
+ UNTIL=9
10
+ IF=10
11
+ THEN=11
12
+ ELSEIF=12
13
+ ELSE=13
14
+ FOR=14
15
+ COMMA=15
16
+ IN=16
17
+ FUNCTION=17
18
+ LOCAL=18
19
+ LT=19
20
+ GT=20
21
+ RETURN=21
22
+ CONTINUE=22
23
+ CC=23
24
+ NIL=24
25
+ FALSE=25
26
+ TRUE=26
27
+ DOT=27
28
+ SQUIG=28
29
+ MINUS=29
30
+ POUND=30
31
+ OP=31
32
+ CP=32
33
+ NOT=33
34
+ LL=34
35
+ GG=35
36
+ AMP=36
37
+ SS=37
38
+ PER=38
39
+ COL=39
40
+ LE=40
41
+ GE=41
42
+ AND=42
43
+ OR=43
44
+ PLUS=44
45
+ STAR=45
46
+ OCU=46
47
+ CCU=47
48
+ OB=48
49
+ CB=49
50
+ EE=50
51
+ DD=51
52
+ PIPE=52
53
+ CARET=53
54
+ SLASH=54
55
+ DDD=55
56
+ SQEQ=56
57
+ NAME=57
58
+ NORMALSTRING=58
59
+ CHARSTRING=59
60
+ LONGSTRING=60
61
+ INT=61
62
+ HEX=62
63
+ FLOAT=63
64
+ HEX_FLOAT=64
65
+ COMMENT=65
66
+ WS=66
67
+ NL=67
68
+ SHEBANG=68
69
+ ';'=1
70
+ '='=2
71
+ 'break'=3
72
+ 'goto'=4
73
+ 'do'=5
74
+ 'end'=6
75
+ 'while'=7
76
+ 'repeat'=8
77
+ 'until'=9
78
+ 'if'=10
79
+ 'then'=11
80
+ 'elseif'=12
81
+ 'else'=13
82
+ 'for'=14
83
+ ','=15
84
+ 'in'=16
85
+ 'function'=17
86
+ 'local'=18
87
+ '<'=19
88
+ '>'=20
89
+ 'return'=21
90
+ 'continue'=22
91
+ '::'=23
92
+ 'nil'=24
93
+ 'false'=25
94
+ 'true'=26
95
+ '.'=27
96
+ '~'=28
97
+ '-'=29
98
+ '#'=30
99
+ '('=31
100
+ ')'=32
101
+ 'not'=33
102
+ '<<'=34
103
+ '>>'=35
104
+ '&'=36
105
+ '//'=37
106
+ '%'=38
107
+ ':'=39
108
+ '<='=40
109
+ '>='=41
110
+ 'and'=42
111
+ 'or'=43
112
+ '+'=44
113
+ '*'=45
114
+ '{'=46
115
+ '}'=47
116
+ '['=48
117
+ ']'=49
118
+ '=='=50
119
+ '..'=51
120
+ '|'=52
121
+ '^'=53
122
+ '/'=54
123
+ '...'=55
124
+ '~='=56
@@ -0,0 +1,66 @@
1
+ from typing import TextIO
2
+ from antlr4 import *
3
+ from antlr4.Token import CommonToken
4
+ import sys
5
+ from typing import TextIO
6
+
7
+
8
+ class LuaLexerBase(Lexer):
9
+ def __init__(self, input: InputStream, output: TextIO = sys.stdout):
10
+ super().__init__(input, output)
11
+ self.start_line = 0
12
+ self.start_col = 0
13
+
14
+ def HandleComment(self):
15
+ self.start_line = self.line
16
+ self.start_col = self.column - 2
17
+ cs = self._input
18
+
19
+ if cs.LA(1) == 91: # '['
20
+ sep = self.skip_sep(cs)
21
+ if sep >= 2:
22
+ self.read_long_string(cs, sep)
23
+ return
24
+
25
+ while cs.LA(1) != 10 and cs.LA(1) != -1: # '\n'
26
+ self._interp.consume(cs)
27
+
28
+ def read_long_string(self, cs: InputStream, sep: int):
29
+ done = False
30
+ self._interp.consume(cs)
31
+
32
+ while not done:
33
+ c = cs.LA(1)
34
+ if c == -1:
35
+ done = True
36
+ elif c == 93: # ']'
37
+ if self.skip_sep(cs) == sep:
38
+ self._interp.consume(cs)
39
+ done = True
40
+ else:
41
+ if cs.LA(1) == -1:
42
+ done = True
43
+ else:
44
+ self._interp.consume(cs)
45
+
46
+ def skip_sep(self, cs: InputStream):
47
+ count = 0
48
+ s = cs.LA(1)
49
+ self._interp.consume(cs)
50
+
51
+ while cs.LA(1) == 61: # '='
52
+ self._interp.consume(cs)
53
+ count += 1
54
+
55
+ if cs.LA(1) == s:
56
+ count += 2
57
+ elif count == 0:
58
+ count = 1
59
+ else:
60
+ count = 0
61
+
62
+ return count
63
+
64
+ def IsLine1Col0(self):
65
+ cs = self._input
66
+ return cs.index == 1
@@ -0,0 +1,173 @@
1
+ token literal names:
2
+ null
3
+ ';'
4
+ '='
5
+ 'break'
6
+ 'goto'
7
+ 'do'
8
+ 'end'
9
+ 'while'
10
+ 'repeat'
11
+ 'until'
12
+ 'if'
13
+ 'then'
14
+ 'elseif'
15
+ 'else'
16
+ 'for'
17
+ ','
18
+ 'in'
19
+ 'function'
20
+ 'local'
21
+ '<'
22
+ '>'
23
+ 'return'
24
+ 'continue'
25
+ '::'
26
+ 'nil'
27
+ 'false'
28
+ 'true'
29
+ '.'
30
+ '~'
31
+ '-'
32
+ '#'
33
+ '('
34
+ ')'
35
+ 'not'
36
+ '<<'
37
+ '>>'
38
+ '&'
39
+ '//'
40
+ '%'
41
+ ':'
42
+ '<='
43
+ '>='
44
+ 'and'
45
+ 'or'
46
+ '+'
47
+ '*'
48
+ '{'
49
+ '}'
50
+ '['
51
+ ']'
52
+ '=='
53
+ '..'
54
+ '|'
55
+ '^'
56
+ '/'
57
+ '...'
58
+ '~='
59
+ null
60
+ null
61
+ null
62
+ null
63
+ null
64
+ null
65
+ null
66
+ null
67
+ null
68
+ null
69
+ null
70
+ null
71
+
72
+ token symbolic names:
73
+ null
74
+ SEMI
75
+ EQ
76
+ BREAK
77
+ GOTO
78
+ DO
79
+ END
80
+ WHILE
81
+ REPEAT
82
+ UNTIL
83
+ IF
84
+ THEN
85
+ ELSEIF
86
+ ELSE
87
+ FOR
88
+ COMMA
89
+ IN
90
+ FUNCTION
91
+ LOCAL
92
+ LT
93
+ GT
94
+ RETURN
95
+ CONTINUE
96
+ CC
97
+ NIL
98
+ FALSE
99
+ TRUE
100
+ DOT
101
+ SQUIG
102
+ MINUS
103
+ POUND
104
+ OP
105
+ CP
106
+ NOT
107
+ LL
108
+ GG
109
+ AMP
110
+ SS
111
+ PER
112
+ COL
113
+ LE
114
+ GE
115
+ AND
116
+ OR
117
+ PLUS
118
+ STAR
119
+ OCU
120
+ CCU
121
+ OB
122
+ CB
123
+ EE
124
+ DD
125
+ PIPE
126
+ CARET
127
+ SLASH
128
+ DDD
129
+ SQEQ
130
+ NAME
131
+ NORMALSTRING
132
+ CHARSTRING
133
+ LONGSTRING
134
+ INT
135
+ HEX
136
+ FLOAT
137
+ HEX_FLOAT
138
+ COMMENT
139
+ WS
140
+ NL
141
+ SHEBANG
142
+
143
+ rule names:
144
+ start_
145
+ chunk
146
+ block
147
+ stat
148
+ attnamelist
149
+ attrib
150
+ retstat
151
+ label
152
+ funcname
153
+ varlist
154
+ namelist
155
+ explist
156
+ exp
157
+ var
158
+ prefixexp
159
+ functioncall
160
+ args
161
+ functiondef
162
+ funcbody
163
+ parlist
164
+ tableconstructor
165
+ fieldlist
166
+ field
167
+ fieldsep
168
+ number
169
+ string
170
+
171
+
172
+ atn:
173
+ [4, 1, 68, 417, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 5, 2, 59, 8, 2, 10, 2, 12, 2, 62, 9, 2, 1, 2, 3, 2, 65, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 101, 8, 3, 10, 3, 12, 3, 104, 9, 3, 1, 3, 1, 3, 3, 3, 108, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 120, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 146, 8, 3, 3, 3, 148, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 5, 4, 155, 8, 4, 10, 4, 12, 4, 158, 9, 4, 1, 5, 1, 5, 1, 5, 3, 5, 163, 8, 5, 1, 6, 1, 6, 3, 6, 167, 8, 6, 1, 6, 3, 6, 170, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 5, 8, 179, 8, 8, 10, 8, 12, 8, 182, 9, 8, 1, 8, 1, 8, 3, 8, 186, 8, 8, 1, 9, 1, 9, 1, 9, 5, 9, 191, 8, 9, 10, 9, 12, 9, 194, 9, 9, 1, 10, 1, 10, 1, 10, 5, 10, 199, 8, 10, 10, 10, 12, 10, 202, 9, 10, 1, 11, 1, 11, 1, 11, 5, 11, 207, 8, 11, 10, 11, 12, 11, 210, 9, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 224, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 250, 8, 12, 10, 12, 12, 12, 253, 9, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 263, 8, 13, 3, 13, 265, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 275, 8, 14, 10, 14, 12, 14, 278, 9, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 287, 8, 14, 10, 14, 12, 14, 290, 9, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 301, 8, 14, 10, 14, 12, 14, 304, 9, 14, 3, 14, 306, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 313, 8, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 321, 8, 15, 10, 15, 12, 15, 324, 9, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 330, 8, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 338, 8, 15, 10, 15, 12, 15, 341, 9, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 347, 8, 15, 5, 15, 349, 8, 15, 10, 15, 12, 15, 352, 9, 15, 1, 16, 1, 16, 3, 16, 356, 8, 16, 1, 16, 1, 16, 1, 16, 3, 16, 361, 8, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 3, 19, 375, 8, 19, 1, 19, 1, 19, 3, 19, 379, 8, 19, 1, 20, 1, 20, 3, 20, 383, 8, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 391, 8, 21, 10, 21, 12, 21, 394, 9, 21, 1, 21, 3, 21, 397, 8, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 409, 8, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 0, 1, 24, 26, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 0, 8, 2, 0, 28, 30, 33, 33, 3, 0, 37, 38, 45, 45, 54, 54, 2, 0, 29, 29, 44, 44, 4, 0, 19, 20, 40, 41, 50, 50, 56, 56, 3, 0, 28, 28, 34, 36, 52, 52, 2, 0, 1, 1, 15, 15, 1, 0, 61, 64, 1, 0, 58, 60, 465, 0, 52, 1, 0, 0, 0, 2, 55, 1, 0, 0, 0, 4, 60, 1, 0, 0, 0, 6, 147, 1, 0, 0, 0, 8, 149, 1, 0, 0, 0, 10, 162, 1, 0, 0, 0, 12, 164, 1, 0, 0, 0, 14, 171, 1, 0, 0, 0, 16, 175, 1, 0, 0, 0, 18, 187, 1, 0, 0, 0, 20, 195, 1, 0, 0, 0, 22, 203, 1, 0, 0, 0, 24, 223, 1, 0, 0, 0, 26, 264, 1, 0, 0, 0, 28, 305, 1, 0, 0, 0, 30, 312, 1, 0, 0, 0, 32, 360, 1, 0, 0, 0, 34, 362, 1, 0, 0, 0, 36, 365, 1, 0, 0, 0, 38, 378, 1, 0, 0, 0, 40, 380, 1, 0, 0, 0, 42, 386, 1, 0, 0, 0, 44, 408, 1, 0, 0, 0, 46, 410, 1, 0, 0, 0, 48, 412, 1, 0, 0, 0, 50, 414, 1, 0, 0, 0, 52, 53, 3, 2, 1, 0, 53, 54, 5, 0, 0, 1, 54, 1, 1, 0, 0, 0, 55, 56, 3, 4, 2, 0, 56, 3, 1, 0, 0, 0, 57, 59, 3, 6, 3, 0, 58, 57, 1, 0, 0, 0, 59, 62, 1, 0, 0, 0, 60, 58, 1, 0, 0, 0, 60, 61, 1, 0, 0, 0, 61, 64, 1, 0, 0, 0, 62, 60, 1, 0, 0, 0, 63, 65, 3, 12, 6, 0, 64, 63, 1, 0, 0, 0, 64, 65, 1, 0, 0, 0, 65, 5, 1, 0, 0, 0, 66, 148, 5, 1, 0, 0, 67, 68, 3, 18, 9, 0, 68, 69, 5, 2, 0, 0, 69, 70, 3, 22, 11, 0, 70, 148, 1, 0, 0, 0, 71, 148, 3, 30, 15, 0, 72, 148, 3, 14, 7, 0, 73, 148, 5, 3, 0, 0, 74, 75, 5, 4, 0, 0, 75, 148, 5, 57, 0, 0, 76, 77, 5, 5, 0, 0, 77, 78, 3, 4, 2, 0, 78, 79, 5, 6, 0, 0, 79, 148, 1, 0, 0, 0, 80, 81, 5, 7, 0, 0, 81, 82, 3, 24, 12, 0, 82, 83, 5, 5, 0, 0, 83, 84, 3, 4, 2, 0, 84, 85, 5, 6, 0, 0, 85, 148, 1, 0, 0, 0, 86, 87, 5, 8, 0, 0, 87, 88, 3, 4, 2, 0, 88, 89, 5, 9, 0, 0, 89, 90, 3, 24, 12, 0, 90, 148, 1, 0, 0, 0, 91, 92, 5, 10, 0, 0, 92, 93, 3, 24, 12, 0, 93, 94, 5, 11, 0, 0, 94, 102, 3, 4, 2, 0, 95, 96, 5, 12, 0, 0, 96, 97, 3, 24, 12, 0, 97, 98, 5, 11, 0, 0, 98, 99, 3, 4, 2, 0, 99, 101, 1, 0, 0, 0, 100, 95, 1, 0, 0, 0, 101, 104, 1, 0, 0, 0, 102, 100, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 107, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 105, 106, 5, 13, 0, 0, 106, 108, 3, 4, 2, 0, 107, 105, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 110, 5, 6, 0, 0, 110, 148, 1, 0, 0, 0, 111, 112, 5, 14, 0, 0, 112, 113, 5, 57, 0, 0, 113, 114, 5, 2, 0, 0, 114, 115, 3, 24, 12, 0, 115, 116, 5, 15, 0, 0, 116, 119, 3, 24, 12, 0, 117, 118, 5, 15, 0, 0, 118, 120, 3, 24, 12, 0, 119, 117, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 121, 1, 0, 0, 0, 121, 122, 5, 5, 0, 0, 122, 123, 3, 4, 2, 0, 123, 124, 5, 6, 0, 0, 124, 148, 1, 0, 0, 0, 125, 126, 5, 14, 0, 0, 126, 127, 3, 20, 10, 0, 127, 128, 5, 16, 0, 0, 128, 129, 3, 22, 11, 0, 129, 130, 5, 5, 0, 0, 130, 131, 3, 4, 2, 0, 131, 132, 5, 6, 0, 0, 132, 148, 1, 0, 0, 0, 133, 134, 5, 17, 0, 0, 134, 135, 3, 16, 8, 0, 135, 136, 3, 36, 18, 0, 136, 148, 1, 0, 0, 0, 137, 138, 5, 18, 0, 0, 138, 139, 5, 17, 0, 0, 139, 140, 5, 57, 0, 0, 140, 148, 3, 36, 18, 0, 141, 142, 5, 18, 0, 0, 142, 145, 3, 8, 4, 0, 143, 144, 5, 2, 0, 0, 144, 146, 3, 22, 11, 0, 145, 143, 1, 0, 0, 0, 145, 146, 1, 0, 0, 0, 146, 148, 1, 0, 0, 0, 147, 66, 1, 0, 0, 0, 147, 67, 1, 0, 0, 0, 147, 71, 1, 0, 0, 0, 147, 72, 1, 0, 0, 0, 147, 73, 1, 0, 0, 0, 147, 74, 1, 0, 0, 0, 147, 76, 1, 0, 0, 0, 147, 80, 1, 0, 0, 0, 147, 86, 1, 0, 0, 0, 147, 91, 1, 0, 0, 0, 147, 111, 1, 0, 0, 0, 147, 125, 1, 0, 0, 0, 147, 133, 1, 0, 0, 0, 147, 137, 1, 0, 0, 0, 147, 141, 1, 0, 0, 0, 148, 7, 1, 0, 0, 0, 149, 150, 5, 57, 0, 0, 150, 156, 3, 10, 5, 0, 151, 152, 5, 15, 0, 0, 152, 153, 5, 57, 0, 0, 153, 155, 3, 10, 5, 0, 154, 151, 1, 0, 0, 0, 155, 158, 1, 0, 0, 0, 156, 154, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 9, 1, 0, 0, 0, 158, 156, 1, 0, 0, 0, 159, 160, 5, 19, 0, 0, 160, 161, 5, 57, 0, 0, 161, 163, 5, 20, 0, 0, 162, 159, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 11, 1, 0, 0, 0, 164, 166, 5, 21, 0, 0, 165, 167, 3, 22, 11, 0, 166, 165, 1, 0, 0, 0, 166, 167, 1, 0, 0, 0, 167, 169, 1, 0, 0, 0, 168, 170, 5, 1, 0, 0, 169, 168, 1, 0, 0, 0, 169, 170, 1, 0, 0, 0, 170, 13, 1, 0, 0, 0, 171, 172, 5, 23, 0, 0, 172, 173, 5, 57, 0, 0, 173, 174, 5, 23, 0, 0, 174, 15, 1, 0, 0, 0, 175, 180, 5, 57, 0, 0, 176, 177, 5, 27, 0, 0, 177, 179, 5, 57, 0, 0, 178, 176, 1, 0, 0, 0, 179, 182, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 185, 1, 0, 0, 0, 182, 180, 1, 0, 0, 0, 183, 184, 5, 39, 0, 0, 184, 186, 5, 57, 0, 0, 185, 183, 1, 0, 0, 0, 185, 186, 1, 0, 0, 0, 186, 17, 1, 0, 0, 0, 187, 192, 3, 26, 13, 0, 188, 189, 5, 15, 0, 0, 189, 191, 3, 26, 13, 0, 190, 188, 1, 0, 0, 0, 191, 194, 1, 0, 0, 0, 192, 190, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 19, 1, 0, 0, 0, 194, 192, 1, 0, 0, 0, 195, 200, 5, 57, 0, 0, 196, 197, 5, 15, 0, 0, 197, 199, 5, 57, 0, 0, 198, 196, 1, 0, 0, 0, 199, 202, 1, 0, 0, 0, 200, 198, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 21, 1, 0, 0, 0, 202, 200, 1, 0, 0, 0, 203, 208, 3, 24, 12, 0, 204, 205, 5, 15, 0, 0, 205, 207, 3, 24, 12, 0, 206, 204, 1, 0, 0, 0, 207, 210, 1, 0, 0, 0, 208, 206, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 23, 1, 0, 0, 0, 210, 208, 1, 0, 0, 0, 211, 212, 6, 12, -1, 0, 212, 224, 5, 24, 0, 0, 213, 224, 5, 25, 0, 0, 214, 224, 5, 26, 0, 0, 215, 224, 3, 48, 24, 0, 216, 224, 3, 50, 25, 0, 217, 224, 5, 55, 0, 0, 218, 224, 3, 34, 17, 0, 219, 224, 3, 28, 14, 0, 220, 224, 3, 40, 20, 0, 221, 222, 7, 0, 0, 0, 222, 224, 3, 24, 12, 8, 223, 211, 1, 0, 0, 0, 223, 213, 1, 0, 0, 0, 223, 214, 1, 0, 0, 0, 223, 215, 1, 0, 0, 0, 223, 216, 1, 0, 0, 0, 223, 217, 1, 0, 0, 0, 223, 218, 1, 0, 0, 0, 223, 219, 1, 0, 0, 0, 223, 220, 1, 0, 0, 0, 223, 221, 1, 0, 0, 0, 224, 251, 1, 0, 0, 0, 225, 226, 10, 9, 0, 0, 226, 227, 5, 53, 0, 0, 227, 250, 3, 24, 12, 9, 228, 229, 10, 7, 0, 0, 229, 230, 7, 1, 0, 0, 230, 250, 3, 24, 12, 8, 231, 232, 10, 6, 0, 0, 232, 233, 7, 2, 0, 0, 233, 250, 3, 24, 12, 7, 234, 235, 10, 5, 0, 0, 235, 236, 5, 51, 0, 0, 236, 250, 3, 24, 12, 5, 237, 238, 10, 4, 0, 0, 238, 239, 7, 3, 0, 0, 239, 250, 3, 24, 12, 5, 240, 241, 10, 3, 0, 0, 241, 242, 5, 42, 0, 0, 242, 250, 3, 24, 12, 4, 243, 244, 10, 2, 0, 0, 244, 245, 5, 43, 0, 0, 245, 250, 3, 24, 12, 3, 246, 247, 10, 1, 0, 0, 247, 248, 7, 4, 0, 0, 248, 250, 3, 24, 12, 2, 249, 225, 1, 0, 0, 0, 249, 228, 1, 0, 0, 0, 249, 231, 1, 0, 0, 0, 249, 234, 1, 0, 0, 0, 249, 237, 1, 0, 0, 0, 249, 240, 1, 0, 0, 0, 249, 243, 1, 0, 0, 0, 249, 246, 1, 0, 0, 0, 250, 253, 1, 0, 0, 0, 251, 249, 1, 0, 0, 0, 251, 252, 1, 0, 0, 0, 252, 25, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 254, 265, 5, 57, 0, 0, 255, 262, 3, 28, 14, 0, 256, 257, 5, 48, 0, 0, 257, 258, 3, 24, 12, 0, 258, 259, 5, 49, 0, 0, 259, 263, 1, 0, 0, 0, 260, 261, 5, 27, 0, 0, 261, 263, 5, 57, 0, 0, 262, 256, 1, 0, 0, 0, 262, 260, 1, 0, 0, 0, 263, 265, 1, 0, 0, 0, 264, 254, 1, 0, 0, 0, 264, 255, 1, 0, 0, 0, 265, 27, 1, 0, 0, 0, 266, 267, 4, 14, 8, 0, 267, 276, 5, 57, 0, 0, 268, 269, 5, 48, 0, 0, 269, 270, 3, 24, 12, 0, 270, 271, 5, 49, 0, 0, 271, 275, 1, 0, 0, 0, 272, 273, 5, 27, 0, 0, 273, 275, 5, 57, 0, 0, 274, 268, 1, 0, 0, 0, 274, 272, 1, 0, 0, 0, 275, 278, 1, 0, 0, 0, 276, 274, 1, 0, 0, 0, 276, 277, 1, 0, 0, 0, 277, 306, 1, 0, 0, 0, 278, 276, 1, 0, 0, 0, 279, 288, 3, 30, 15, 0, 280, 281, 5, 48, 0, 0, 281, 282, 3, 24, 12, 0, 282, 283, 5, 49, 0, 0, 283, 287, 1, 0, 0, 0, 284, 285, 5, 27, 0, 0, 285, 287, 5, 57, 0, 0, 286, 280, 1, 0, 0, 0, 286, 284, 1, 0, 0, 0, 287, 290, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 288, 289, 1, 0, 0, 0, 289, 306, 1, 0, 0, 0, 290, 288, 1, 0, 0, 0, 291, 292, 5, 31, 0, 0, 292, 293, 3, 24, 12, 0, 293, 302, 5, 32, 0, 0, 294, 295, 5, 48, 0, 0, 295, 296, 3, 24, 12, 0, 296, 297, 5, 49, 0, 0, 297, 301, 1, 0, 0, 0, 298, 299, 5, 27, 0, 0, 299, 301, 5, 57, 0, 0, 300, 294, 1, 0, 0, 0, 300, 298, 1, 0, 0, 0, 301, 304, 1, 0, 0, 0, 302, 300, 1, 0, 0, 0, 302, 303, 1, 0, 0, 0, 303, 306, 1, 0, 0, 0, 304, 302, 1, 0, 0, 0, 305, 266, 1, 0, 0, 0, 305, 279, 1, 0, 0, 0, 305, 291, 1, 0, 0, 0, 306, 29, 1, 0, 0, 0, 307, 313, 5, 57, 0, 0, 308, 309, 5, 31, 0, 0, 309, 310, 3, 24, 12, 0, 310, 311, 5, 32, 0, 0, 311, 313, 1, 0, 0, 0, 312, 307, 1, 0, 0, 0, 312, 308, 1, 0, 0, 0, 313, 322, 1, 0, 0, 0, 314, 315, 5, 48, 0, 0, 315, 316, 3, 24, 12, 0, 316, 317, 5, 49, 0, 0, 317, 321, 1, 0, 0, 0, 318, 319, 5, 27, 0, 0, 319, 321, 5, 57, 0, 0, 320, 314, 1, 0, 0, 0, 320, 318, 1, 0, 0, 0, 321, 324, 1, 0, 0, 0, 322, 320, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 329, 1, 0, 0, 0, 324, 322, 1, 0, 0, 0, 325, 330, 3, 32, 16, 0, 326, 327, 5, 39, 0, 0, 327, 328, 5, 57, 0, 0, 328, 330, 3, 32, 16, 0, 329, 325, 1, 0, 0, 0, 329, 326, 1, 0, 0, 0, 330, 350, 1, 0, 0, 0, 331, 332, 5, 48, 0, 0, 332, 333, 3, 24, 12, 0, 333, 334, 5, 49, 0, 0, 334, 338, 1, 0, 0, 0, 335, 336, 5, 27, 0, 0, 336, 338, 5, 57, 0, 0, 337, 331, 1, 0, 0, 0, 337, 335, 1, 0, 0, 0, 338, 341, 1, 0, 0, 0, 339, 337, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 346, 1, 0, 0, 0, 341, 339, 1, 0, 0, 0, 342, 347, 3, 32, 16, 0, 343, 344, 5, 39, 0, 0, 344, 345, 5, 57, 0, 0, 345, 347, 3, 32, 16, 0, 346, 342, 1, 0, 0, 0, 346, 343, 1, 0, 0, 0, 347, 349, 1, 0, 0, 0, 348, 339, 1, 0, 0, 0, 349, 352, 1, 0, 0, 0, 350, 348, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 31, 1, 0, 0, 0, 352, 350, 1, 0, 0, 0, 353, 355, 5, 31, 0, 0, 354, 356, 3, 22, 11, 0, 355, 354, 1, 0, 0, 0, 355, 356, 1, 0, 0, 0, 356, 357, 1, 0, 0, 0, 357, 361, 5, 32, 0, 0, 358, 361, 3, 40, 20, 0, 359, 361, 3, 50, 25, 0, 360, 353, 1, 0, 0, 0, 360, 358, 1, 0, 0, 0, 360, 359, 1, 0, 0, 0, 361, 33, 1, 0, 0, 0, 362, 363, 5, 17, 0, 0, 363, 364, 3, 36, 18, 0, 364, 35, 1, 0, 0, 0, 365, 366, 5, 31, 0, 0, 366, 367, 3, 38, 19, 0, 367, 368, 5, 32, 0, 0, 368, 369, 3, 4, 2, 0, 369, 370, 5, 6, 0, 0, 370, 37, 1, 0, 0, 0, 371, 374, 3, 20, 10, 0, 372, 373, 5, 15, 0, 0, 373, 375, 5, 55, 0, 0, 374, 372, 1, 0, 0, 0, 374, 375, 1, 0, 0, 0, 375, 379, 1, 0, 0, 0, 376, 379, 5, 55, 0, 0, 377, 379, 1, 0, 0, 0, 378, 371, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 378, 377, 1, 0, 0, 0, 379, 39, 1, 0, 0, 0, 380, 382, 5, 46, 0, 0, 381, 383, 3, 42, 21, 0, 382, 381, 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 385, 5, 47, 0, 0, 385, 41, 1, 0, 0, 0, 386, 392, 3, 44, 22, 0, 387, 388, 3, 46, 23, 0, 388, 389, 3, 44, 22, 0, 389, 391, 1, 0, 0, 0, 390, 387, 1, 0, 0, 0, 391, 394, 1, 0, 0, 0, 392, 390, 1, 0, 0, 0, 392, 393, 1, 0, 0, 0, 393, 396, 1, 0, 0, 0, 394, 392, 1, 0, 0, 0, 395, 397, 3, 46, 23, 0, 396, 395, 1, 0, 0, 0, 396, 397, 1, 0, 0, 0, 397, 43, 1, 0, 0, 0, 398, 399, 5, 48, 0, 0, 399, 400, 3, 24, 12, 0, 400, 401, 5, 49, 0, 0, 401, 402, 5, 2, 0, 0, 402, 403, 3, 24, 12, 0, 403, 409, 1, 0, 0, 0, 404, 405, 5, 57, 0, 0, 405, 406, 5, 2, 0, 0, 406, 409, 3, 24, 12, 0, 407, 409, 3, 24, 12, 0, 408, 398, 1, 0, 0, 0, 408, 404, 1, 0, 0, 0, 408, 407, 1, 0, 0, 0, 409, 45, 1, 0, 0, 0, 410, 411, 7, 5, 0, 0, 411, 47, 1, 0, 0, 0, 412, 413, 7, 6, 0, 0, 413, 49, 1, 0, 0, 0, 414, 415, 7, 7, 0, 0, 415, 51, 1, 0, 0, 0, 44, 60, 64, 102, 107, 119, 145, 147, 156, 162, 166, 169, 180, 185, 192, 200, 208, 223, 249, 251, 262, 264, 274, 276, 286, 288, 300, 302, 305, 312, 320, 322, 329, 337, 339, 346, 350, 355, 360, 374, 378, 382, 392, 396, 408]