aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Borner2023-05-26 18:08:09 +0200
committerMarvin Borner2023-05-26 18:09:39 +0200
commit464cca35825a02541efd46cfd3af91146c118d01 (patch)
tree2c9709cfbc9705d8d2c7eda481e81c6e1ff32ca7
parentb31220aadc24ff137a4fe4bc39780ae63c58e11b (diff)
Becoming aggressive
-rw-r--r--.gitmodules3
-rw-r--r--inc/hash.h14
-rw-r--r--inc/hashmap.h31
-rw-r--r--inc/log.h11
-rw-r--r--makefile12
-rw-r--r--readme.md56
-rw-r--r--src/hash.c135
-rw-r--r--src/hashmap.c327
-rw-r--r--src/log.c40
-rw-r--r--src/main.c177
-rw-r--r--tests/1.in1
-rw-r--r--tests/1.red1
-rw-r--r--tests/1.trans1
-rw-r--r--tests/2.in1
-rw-r--r--tests/2.red1
-rw-r--r--tests/2.trans1
-rw-r--r--tests/3.in1
-rw-r--r--tests/3.red1
-rw-r--r--tests/3.trans1
-rw-r--r--tests/4.in1
-rw-r--r--tests/4.red1
-rw-r--r--tests/4.trans1
-rw-r--r--tests/5.in1
-rw-r--r--tests/5.red1
-rw-r--r--tests/5.trans1
-rw-r--r--tests/6.in1
-rw-r--r--tests/6.red1
-rw-r--r--tests/6.trans1
-rw-r--r--tests/readme.md19
29 files changed, 741 insertions, 102 deletions
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 7050620..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "lib/bdwgc"]
- path = lib/bdwgc
- url = https://github.com/ivmai/bdwgc
diff --git a/inc/hash.h b/inc/hash.h
new file mode 100644
index 0000000..f0bb468
--- /dev/null
+++ b/inc/hash.h
@@ -0,0 +1,14 @@
+// Copyright (c) 2023, Marvin Borner <dev@marvinborner.de>
+// SPDX-License-Identifier: MIT
+
+#ifndef BLOC_HASH_H
+#define BLOC_HASH_H
+
+#include <stdint.h>
+#include <stddef.h>
+
+typedef uint64_t hash_t;
+
+hash_t hash(void *data, size_t len, uint64_t seed);
+
+#endif
diff --git a/inc/hashmap.h b/inc/hashmap.h
new file mode 100644
index 0000000..b13b815
--- /dev/null
+++ b/inc/hashmap.h
@@ -0,0 +1,31 @@
+// Copyright 2020 Joshua J Baker. All rights reserved.
+// Copyright 2023 Marvin Borner
+// Use of this source code is governed by an MIT-style
+// license that can be found in the LICENSE file.
+
+#ifndef HASHMAP_H
+#define HASHMAP_H
+
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+
+struct hashmap;
+
+struct hashmap *hashmap_new(size_t elsize, size_t cap,
+ void (*elfree)(void *item));
+
+void hashmap_free(struct hashmap *map);
+void hashmap_clear(struct hashmap *map, bool update_cap);
+size_t hashmap_count(struct hashmap *map);
+bool hashmap_oom(struct hashmap *map);
+void *hashmap_probe(struct hashmap *map, uint64_t position);
+bool hashmap_scan(struct hashmap *map, bool (*iter)(void *item));
+bool hashmap_iter(struct hashmap *map, size_t *i, void **item);
+
+void *hashmap_get(struct hashmap *map, uint64_t hash);
+void *hashmap_delete(struct hashmap *map, uint64_t hash);
+void *hashmap_set(struct hashmap *map, void *item, uint64_t hash);
+void hashmap_set_grow_by_power(struct hashmap *map, size_t power);
+
+#endif
diff --git a/inc/log.h b/inc/log.h
new file mode 100644
index 0000000..8d33658
--- /dev/null
+++ b/inc/log.h
@@ -0,0 +1,11 @@
+// Copyright (c) 2023, Marvin Borner <dev@marvinborner.de>
+// SPDX-License-Identifier: MIT
+
+#ifndef BLOC_LOG_H
+#define BLOC_LOG_H
+
+void debug(const char *format, ...);
+void debug_enable(int enable);
+void fatal(const char *format, ...) __attribute__((noreturn));
+
+#endif
diff --git a/makefile b/makefile
index fff2aa8..56e0fc8 100644
--- a/makefile
+++ b/makefile
@@ -7,7 +7,6 @@ TG = ctags
BUILD = ${CURDIR}/build
SRC = ${CURDIR}/src
INC = ${CURDIR}/inc
-LIB = ${CURDIR}/lib
SRCS = $(wildcard $(SRC)/*.c)
OBJS = $(patsubst $(SRC)/%.c, $(BUILD)/%.o, $(SRCS))
@@ -15,13 +14,6 @@ CFLAGS_DEBUG = -Wno-error -g -O0 -Wno-unused -fsanitize=address,undefined,leak
CFLAGS_WARNINGS = -Wall -Wextra -Wshadow -Wpointer-arith -Wwrite-strings -Wredundant-decls -Wnested-externs -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wswitch-default -Wswitch-enum -Wunreachable-code -Wundef -Wold-style-definition -pedantic -Wno-switch-enum
CFLAGS = $(CFLAGS_WARNINGS) -std=c99 -Ofast -I$(INC)
-ifdef TEST # TODO: Somehow clean automagically
-CFLAGS += -DTEST -DNTESTS=$(TEST)
-ifdef START
-CFLAGS += -DSTARTTEST=$(START)
-endif
-endif
-
ifdef DEBUG # TODO: Somehow clean automagically
CFLAGS += $(CFLAGS_DEBUG)
endif
@@ -30,7 +22,9 @@ ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
-all: compile sync
+all: compile
+
+full: all sync
compile: $(BUILD) $(OBJS) $(BUILD)/calm
diff --git a/readme.md b/readme.md
index ded84c9..db27b44 100644
--- a/readme.md
+++ b/readme.md
@@ -2,57 +2,9 @@
> **c**alm **a**bstract **l**ambda **m**achine
-- **Strong** reduction (reduction inside abstractions) of
- **call-by-need** lambda calculus
-- Originally intended as reducer of the
- [`bruijn`](https://github.com/marvinborner/bruijn) programming
- language
-- Useful for proof assistants or as a high-level lambda-term reducer
- of functional programming languages
-- Based on bleeding-edge research results
-- Mostly linear time/memory complexity\[0\]
-
-## Garbage collection
-
-In theory the RKNL abstract machine should be able to be implementented
-without a periodic/incremental garbage collector.
-
-I tried implementing it using reference counting but eventually gave up.
-You can find my attempts at
-[a0b4299cbd](https://github.com/marvinborner/calm/tree/a0b4299cbda261684ad464b22c07a07bcf3acbed).
-
## Libraries
-- [CHAMP](https://github.com/ammut/immutable-c-ollections) \[MIT\]:
- Underrated efficient hash array mapped trie
-- [BDWGC](https://github.com/ivmai/bdwgc) \[MIT\]: Boehm-Demers-Weiser
- Garbage Collector
-
-## Research
-
-The base of this project is the RKNL\[0\] abstract machine. Other
-interesting/relevant research in no particular order:
-
-0. Biernacka, M., Charatonik, W., & Drab, T. (2022). A simple and
- efficient implementation of strong call by need by an abstract
- machine. Proceedings of the ACM on Programming Languages, 6(ICFP),
- 109-136.
-1. Accattoli, B., Condoluci, A., & Coen, C. S. (2021, June). Strong
- call-by-value is reasonable, implosively. In 2021 36th Annual
- ACM/IEEE Symposium on Logic in Computer Science (LICS) (pp. 1-14).
- IEEE.
-2. Balabonski, T., Lanco, A., & Melquiond, G. (2021). A strong
- call-by-need calculus. arXiv preprint arXiv:2111.01485.
-3. Accattoli, B., Condoluci, A., Guerrieri, G., & Coen, C. S. (2019,
- October). Crumbling abstract machines. In Proceedings of the 21st
- International Symposium on Principles and Practice of Declarative
- Programming (pp. 1-15).
-4. Accattoli, B., & Coen, C. S. (2015, July). On the relative
- usefulness of fireballs. In 2015 30th Annual ACM/IEEE Symposium on
- Logic in Computer Science (pp. 141-155). IEEE.
-5. Condoluci, A., Accattoli, B., & Coen, C. S. (2019, October). Sharing
- equality is linear. In Proceedings of the 21st International
- Symposium on Principles and Practice of Declarative Programming
- (pp. 1-14).
-6. Accattoli, B., & Leberle, M. (2021). Useful open call-by-need. arXiv
- preprint arXiv:2107.06591.
+- [hashmap.c](https://github.com/tidwall/hashmap.c) \[MIT\]: Simple
+ but efficient hashmap
+- [xxHash](https://github.com/Cyan4973/xxHash/) \[BSD 2-Clause\]:
+ Extremely fast hash algorithm
diff --git a/src/hash.c b/src/hash.c
new file mode 100644
index 0000000..be8e369
--- /dev/null
+++ b/src/hash.c
@@ -0,0 +1,135 @@
+//-----------------------------------------------------------------------------
+// xxHash Library
+// Copyright (c) 2012-2021 Yann Collet
+// Copyright (c) 2023 Marvin Borner
+// All rights reserved.
+//
+// BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
+//
+// xxHash3
+//-----------------------------------------------------------------------------
+
+#include <string.h>
+
+#include <hash.h>
+
+#define XXH_PRIME_1 11400714785074694791ULL
+#define XXH_PRIME_2 14029467366897019727ULL
+#define XXH_PRIME_3 1609587929392839161ULL
+#define XXH_PRIME_4 9650029242287828579ULL
+#define XXH_PRIME_5 2870177450012600261ULL
+
+static uint64_t XXH_read64(void *memptr)
+{
+ uint64_t val;
+ memcpy(&val, memptr, sizeof(val));
+ return val;
+}
+
+static uint32_t XXH_read32(void *memptr)
+{
+ uint32_t val;
+ memcpy(&val, memptr, sizeof(val));
+ return val;
+}
+
+static uint64_t XXH_rotl64(uint64_t x, int r)
+{
+ return (x << r) | (x >> (64 - r));
+}
+
+hash_t hash(void *data, size_t len, uint64_t seed)
+{
+ uint8_t *p = (uint8_t *)data;
+ uint8_t *end = p + len;
+ uint64_t h64;
+
+ if (len >= 32) {
+ uint8_t *limit = end - 32;
+ uint64_t v1 = seed + XXH_PRIME_1 + XXH_PRIME_2;
+ uint64_t v2 = seed + XXH_PRIME_2;
+ uint64_t v3 = seed + 0;
+ uint64_t v4 = seed - XXH_PRIME_1;
+
+ do {
+ v1 += XXH_read64(p) * XXH_PRIME_2;
+ v1 = XXH_rotl64(v1, 31);
+ v1 *= XXH_PRIME_1;
+
+ v2 += XXH_read64(p + 8) * XXH_PRIME_2;
+ v2 = XXH_rotl64(v2, 31);
+ v2 *= XXH_PRIME_1;
+
+ v3 += XXH_read64(p + 16) * XXH_PRIME_2;
+ v3 = XXH_rotl64(v3, 31);
+ v3 *= XXH_PRIME_1;
+
+ v4 += XXH_read64(p + 24) * XXH_PRIME_2;
+ v4 = XXH_rotl64(v4, 31);
+ v4 *= XXH_PRIME_1;
+
+ p += 32;
+ } while (p <= limit);
+
+ h64 = XXH_rotl64(v1, 1) + XXH_rotl64(v2, 7) +
+ XXH_rotl64(v3, 12) + XXH_rotl64(v4, 18);
+
+ v1 *= XXH_PRIME_2;
+ v1 = XXH_rotl64(v1, 31);
+ v1 *= XXH_PRIME_1;
+ h64 ^= v1;
+ h64 = h64 * XXH_PRIME_1 + XXH_PRIME_4;
+
+ v2 *= XXH_PRIME_2;
+ v2 = XXH_rotl64(v2, 31);
+ v2 *= XXH_PRIME_1;
+ h64 ^= v2;
+ h64 = h64 * XXH_PRIME_1 + XXH_PRIME_4;
+
+ v3 *= XXH_PRIME_2;
+ v3 = XXH_rotl64(v3, 31);
+ v3 *= XXH_PRIME_1;
+ h64 ^= v3;
+ h64 = h64 * XXH_PRIME_1 + XXH_PRIME_4;
+
+ v4 *= XXH_PRIME_2;
+ v4 = XXH_rotl64(v4, 31);
+ v4 *= XXH_PRIME_1;
+ h64 ^= v4;
+ h64 = h64 * XXH_PRIME_1 + XXH_PRIME_4;
+ } else {
+ h64 = seed + XXH_PRIME_5;
+ }
+
+ h64 += (uint64_t)len;
+
+ while (p + 8 <= end) {
+ uint64_t k1 = XXH_read64(p);
+ k1 *= XXH_PRIME_2;
+ k1 = XXH_rotl64(k1, 31);
+ k1 *= XXH_PRIME_1;
+ h64 ^= k1;
+ h64 = XXH_rotl64(h64, 27) * XXH_PRIME_1 + XXH_PRIME_4;
+ p += 8;
+ }
+
+ if (p + 4 <= end) {
+ h64 ^= (uint64_t)(XXH_read32(p)) * XXH_PRIME_1;
+ h64 = XXH_rotl64(h64, 23) * XXH_PRIME_2 + XXH_PRIME_3;
+ p += 4;
+ }
+
+ while (p < end) {
+ h64 ^= (*p) * XXH_PRIME_5;
+ h64 = XXH_rotl64(h64, 11) * XXH_PRIME_1;
+ p++;
+ }
+
+ h64 ^= h64 >> 33;
+ h64 *= XXH_PRIME_2;
+ h64 ^= h64 >> 29;
+ h64 *= XXH_PRIME_3;
+ h64 ^= h64 >> 32;
+
+ return h64;
+}
diff --git a/src/hashmap.c b/src/hashmap.c
new file mode 100644
index 0000000..94b170d
--- /dev/null
+++ b/src/hashmap.c
@@ -0,0 +1,327 @@
+// Copyright 2020 Joshua J Baker. All rights reserved.
+// Copyright 2023 Marvin Borner
+// Use of this source code is governed by an MIT-style
+// license that can be found in the LICENSE file.
+
+// This is a fork of tidwall's hashmap. It's heavily reduced and adapted.
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stddef.h>
+
+#include <hashmap.h>
+#include <hash.h>
+
+#define GROW_AT 0.60
+#define SHRINK_AT 0.10
+
+struct bucket {
+ uint64_t hash : 48;
+ uint64_t dib : 16;
+};
+
+struct hashmap {
+ size_t elsize;
+ size_t cap;
+ void (*elfree)(void *item);
+ size_t bucketsz;
+ size_t nbuckets;
+ size_t count;
+ size_t mask;
+ size_t growat;
+ size_t shrinkat;
+ uint8_t growpower;
+ bool oom;
+ void *buckets;
+ void *spare;
+ void *edata;
+};
+
+void hashmap_set_grow_by_power(struct hashmap *map, size_t power)
+{
+ map->growpower = power < 1 ? 1 : power > 16 ? 16 : power;
+}
+
+static struct bucket *bucket_at0(void *buckets, size_t bucketsz, size_t i)
+{
+ return (struct bucket *)(((char *)buckets) + (bucketsz * i));
+}
+
+static struct bucket *bucket_at(struct hashmap *map, size_t index)
+{
+ return bucket_at0(map->buckets, map->bucketsz, index);
+}
+
+static void *bucket_item(struct bucket *entry)
+{
+ return ((char *)entry) + sizeof(struct bucket);
+}
+
+static uint64_t clip_hash(uint64_t hash)
+{
+ return hash & 0xFFFFFFFFFFFF;
+}
+
+struct hashmap *hashmap_new(size_t elsize, size_t cap,
+ void (*elfree)(void *item))
+{
+ size_t ncap = 16;
+ if (cap < ncap) {
+ cap = ncap;
+ } else {
+ while (ncap < cap) {
+ ncap *= 2;
+ }
+ cap = ncap;
+ }
+ size_t bucketsz = sizeof(struct bucket) + elsize;
+ while (bucketsz & (sizeof(uintptr_t) - 1)) {
+ bucketsz++;
+ }
+ // hashmap + spare + edata
+ size_t size = sizeof(struct hashmap) + bucketsz * 2;
+ struct hashmap *map = malloc(size);
+ if (!map) {
+ return NULL;
+ }
+ memset(map, 0, sizeof(struct hashmap));
+ map->elsize = elsize;
+ map->bucketsz = bucketsz;
+ map->elfree = elfree;
+ map->spare = ((char *)map) + sizeof(struct hashmap);
+ map->edata = (char *)map->spare + bucketsz;
+ map->cap = cap;
+ map->nbuckets = cap;
+ map->mask = map->nbuckets - 1;
+ map->buckets = malloc(map->bucketsz * map->nbuckets);
+ if (!map->buckets) {
+ free(map);
+ return NULL;
+ }
+ memset(map->buckets, 0, map->bucketsz * map->nbuckets);
+ map->growpower = 1;
+ map->growat = map->nbuckets * GROW_AT;
+ map->shrinkat = map->nbuckets * SHRINK_AT;
+ return map;
+}
+
+static void free_elements(struct hashmap *map)
+{
+ if (!map->elfree)
+ return;
+
+ for (size_t i = 0; i < map->nbuckets; i++) {
+ struct bucket *bucket = bucket_at(map, i);
+ if (bucket->dib)
+ map->elfree(bucket_item(bucket));
+ }
+}
+
+void hashmap_clear(struct hashmap *map, bool update_cap)
+{
+ map->count = 0;
+ free_elements(map);
+ if (update_cap) {
+ map->cap = map->nbuckets;
+ } else if (map->nbuckets != map->cap) {
+ void *new_buckets = malloc(map->bucketsz * map->cap);
+ if (new_buckets) {
+ free(map->buckets);
+ map->buckets = new_buckets;
+ }
+ map->nbuckets = map->cap;
+ }
+ memset(map->buckets, 0, map->bucketsz * map->nbuckets);
+ map->mask = map->nbuckets - 1;
+ map->growat = map->nbuckets * 0.75;
+ map->shrinkat = map->nbuckets * 0.10;
+}
+
+static bool resize0(struct hashmap *map, size_t new_cap)
+{
+ struct hashmap *map2 = hashmap_new(map->elsize, new_cap, map->elfree);
+ if (!map2)
+ return false;
+ for (size_t i = 0; i < map->nbuckets; i++) {
+ struct bucket *entry = bucket_at(map, i);
+ if (!entry->dib) {
+ continue;
+ }
+ entry->dib = 1;
+ size_t j = entry->hash & map2->mask;
+ while (1) {
+ struct bucket *bucket = bucket_at(map2, j);
+ if (bucket->dib == 0) {
+ memcpy(bucket, entry, map->bucketsz);
+ break;
+ }
+ if (bucket->dib < entry->dib) {
+ memcpy(map2->spare, bucket, map->bucketsz);
+ memcpy(bucket, entry, map->bucketsz);
+ memcpy(entry, map2->spare, map->bucketsz);
+ }
+ j = (j + 1) & map2->mask;
+ entry->dib += 1;
+ }
+ }
+ free(map->buckets);
+ map->buckets = map2->buckets;
+ map->nbuckets = map2->nbuckets;
+ map->mask = map2->mask;
+ map->growat = map2->growat;
+ map->shrinkat = map2->shrinkat;
+ free(map2);
+ return true;
+}
+
+static bool resize(struct hashmap *map, size_t new_cap)
+{
+ return resize0(map, new_cap);
+}
+
+void *hashmap_set(struct hashmap *map, void *item, uint64_t hash)
+{
+ hash = clip_hash(hash);
+ map->oom = false;
+ if (map->count == map->growat) {
+ if (!resize(map, map->nbuckets * (1 << map->growpower))) {
+ map->oom = true;
+ return NULL;
+ }
+ }
+
+ struct bucket *entry = map->edata;
+ entry->hash = hash;
+ entry->dib = 1;
+ void *eitem = bucket_item(entry);
+ memcpy(eitem, item, map->elsize);
+
+ void *bitem;
+ size_t i = entry->hash & map->mask;
+ while (1) {
+ struct bucket *bucket = bucket_at(map, i);
+ if (bucket->dib == 0) {
+ memcpy(bucket, entry, map->bucketsz);
+ map->count++;
+ return NULL;
+ }
+ bitem = bucket_item(bucket);
+ if (entry->hash == bucket->hash) {
+ memcpy(map->spare, bitem, map->elsize);
+ memcpy(bitem, eitem, map->elsize);
+ return map->spare;
+ }
+ if (bucket->dib < entry->dib) {
+ memcpy(map->spare, bucket, map->bucketsz);
+ memcpy(bucket, entry, map->bucketsz);
+ memcpy(entry, map->spare, map->bucketsz);
+ eitem = bucket_item(entry);
+ }
+ i = (i + 1) & map->mask;
+ entry->dib += 1;
+ }
+}
+
+void *hashmap_get(struct hashmap *map, uint64_t hash)
+{
+ hash = clip_hash(hash);
+ size_t i = hash & map->mask;
+ while (1) {
+ struct bucket *bucket = bucket_at(map, i);
+ if (!bucket->dib)
+ return NULL;
+ if (bucket->hash == hash)
+ return bucket_item(bucket);
+ i = (i + 1) & map->mask;
+ }
+}
+
+void *hashmap_probe(struct hashmap *map, uint64_t position)
+{
+ size_t i = position & map->mask;
+ struct bucket *bucket = bucket_at(map, i);
+ if (!bucket->dib) {
+ return NULL;
+ }
+ return bucket_item(bucket);
+}
+
+void *hashmap_delete(struct hashmap *map, uint64_t hash)
+{
+ hash = clip_hash(hash);
+ map->oom = false;
+ size_t i = hash & map->mask;
+ while (1) {
+ struct bucket *bucket = bucket_at(map, i);
+ if (!bucket->dib)
+ return NULL;
+ void *bitem = bucket_item(bucket);
+ if (bucket->hash == hash) {
+ memcpy(map->spare, bitem, map->elsize);
+ bucket->dib = 0;
+ while (1) {
+ struct bucket *prev = bucket;
+ i = (i + 1) & map->mask;
+ bucket = bucket_at(map, i);
+ if (bucket->dib <= 1) {
+ prev->dib = 0;
+ break;
+ }
+ memcpy(prev, bucket, map->bucketsz);
+ prev->dib--;
+ }
+ map->count--;
+ if (map->nbuckets > map->cap &&
+ map->count <= map->shrinkat) {
+ resize(map, map->nbuckets / 2);
+ }
+ return map->spare;
+ }
+ i = (i + 1) & map->mask;
+ }
+}
+
+size_t hashmap_count(struct hashmap *map)
+{
+ return map->count;
+}
+
+void hashmap_free(struct hashmap *map)
+{
+ if (!map)
+ return;
+ free_elements(map);
+ free(map->buckets);
+ free(map);
+}
+
+bool hashmap_oom(struct hashmap *map)
+{
+ return map->oom;
+}
+
+bool hashmap_scan(struct hashmap *map, bool (*iter)(void *item))
+{
+ for (size_t i = 0; i < map->nbuckets; i++) {
+ struct bucket *bucket = bucket_at(map, i);
+ if (bucket->dib && !iter(bucket_item(bucket))) {
+ return false;
+ }
+ }
+ return true;
+}
+
+bool hashmap_iter(struct hashmap *map, size_t *i, void **item)
+{
+ struct bucket *bucket;
+ do {
+ if (*i >= map->nbuckets)
+ return false;
+ bucket = bucket_at(map, *i);
+ (*i)++;
+ } while (!bucket->dib);
+ *item = bucket_item(bucket);
+ return true;
+}
diff --git a/src/log.c b/src/log.c
new file mode 100644
index 0000000..a34c8e8
--- /dev/null
+++ b/src/log.c
@@ -0,0 +1,40 @@
+// Copyright (c) 2023, Marvin Borner <dev@marvinborner.de>
+// SPDX-License-Identifier: MIT
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+#include <log.h>
+
+static int debug_enabled = 0;
+
+void debug(const char *format, ...)
+{
+ if (!debug_enabled)
+ return;
+
+ fprintf(stderr, "[DEBUG] ");
+
+ va_list ap;
+ va_start(ap, format);
+ vfprintf(stderr, format, ap);
+ va_end(ap);
+}
+
+void debug_enable(int enable)
+{
+ debug_enabled = enable;
+}
+
+void fatal(const char *format, ...)
+{
+ fprintf(stderr, "[FATAL] ");
+
+ va_list ap;
+ va_start(ap, format);
+ vfprintf(stderr, format, ap);
+ va_end(ap);
+
+ abort();
+}
diff --git a/src/main.c b/src/main.c
index 5b74476..eb651bd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,7 +1,182 @@
+// Copyright (c) 2023, Marvin Borner <dev@marvinborner.de>
+// SPDX-License-Identifier: MIT
+
#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+
+#include <log.h>
+#include <hash.h>
+#include <hashmap.h>
+
+struct hashmap *all_terms;
+
+typedef enum { INV, ABS, APP, VAR } term_type_t;
+
+struct term {
+ term_type_t type;
+ hash_t hash;
+ size_t refs;
+ union {
+ struct {
+ hash_t term;
+ } abs;
+ struct {
+ hash_t lhs;
+ hash_t rhs;
+ } app;
+ struct {
+ int index;
+ } var;
+ } u;
+};
+
+static void deref_term(struct term *term)
+{
+ if (term->type == ABS) {
+ deref_term(hashmap_get(all_terms, term->u.abs.term));
+ } else if (term->type == APP) {
+ deref_term(hashmap_get(all_terms, term->u.app.lhs));
+ deref_term(hashmap_get(all_terms, term->u.app.rhs));
+ }
+
+ // TODO: remove from hashmap?
+ if (--term->refs == 0)
+ free(term);
+}
+
+static void hashmap_free_term(void *item)
+{
+ struct term *term = *(struct term **)item;
+ free(term);
+}
+
+static struct term *new_term(term_type_t type)
+{
+ struct term *term = malloc(sizeof(*term));
+ if (!term)
+ fatal("out of memory!\n");
+ term->type = type;
+ return term;
+}
+
+// TODO: bit rec_bblc
+static hash_t rec_blc(char **term)
+{
+ hash_t res = 0;
+ struct term *res_term = 0;
+ term_type_t res_type = 0;
+
+ if (!**term) {
+ fatal("invalid parsing state!\n");
+ } else if (**term == '0' && *(*term + 1) == '0') {
+ (*term) += 2;
+ res_type = ABS;
+ hash_t inner_hash = rec_blc(term);
+ res = hash((uint8_t *)&res_type, sizeof(res_type), inner_hash);
+
+ struct term **handle = hashmap_get(all_terms, res);
+ if (handle) {
+ res_term = *handle;
+ res_term->refs++;
+ } else {
+ res_term = new_term(ABS);
+ res_term->refs = 1;
+ res_term->hash = res;
+ res_term->u.abs.term = inner_hash;
+ hashmap_set(all_terms, &res_term, res);
+ }
+ } else if (**term == '0' && *(*term + 1) == '1') {
+ (*term) += 2;
+ res_type = APP;
+ hash_t lhs_hash = rec_blc(term);
+ hash_t rhs_hash = rec_blc(term);
+ res = hash((uint8_t *)&res_type, sizeof(res_type), lhs_hash);
+ res = hash((uint8_t *)&res, sizeof(res), rhs_hash);
+
+ struct term **handle = hashmap_get(all_terms, res);
+ if (handle) {
+ res_term = *handle;
+ res_term->refs++;
+ } else {
+ res_term = new_term(res_type);
+ res_term->refs = 1;
+ res_term->hash = res;
+ res_term->u.app.lhs = lhs_hash;
+ res_term->u.app.rhs = rhs_hash;
+ hashmap_set(all_terms, &res_term, res);
+ }
+ } else if (**term == '1') {
+ res_type = VAR;
+ const char *cur = *term;
+ while (**term == '1')
+ (*term)++;
+ int index = *term - cur - 1;
+ res = hash((uint8_t *)&res_type, sizeof(res_type), index);
+
+ struct term **handle = hashmap_get(all_terms, res);
+ if (handle) {
+ res_term = *handle;
+ res_term->refs++;
+ } else {
+ res_term = new_term(res_type);
+ res_term->refs = 1;
+ res_term->hash = res;
+ res_term->u.var.index = index;
+ hashmap_set(all_terms, &res_term, res);
+ }
+ (*term)++;
+ } else {
+ (*term)++;
+ res = rec_blc(term);
+ }
+ return res;
+}
+
+static char *read_file(FILE *f)
+{
+ fseek(f, 0, SEEK_END);
+ long fsize = ftell(f);
+ fseek(f, 0, SEEK_SET);
+
+ char *string = malloc(fsize + 1);
+ if (!string)
+ fatal("out of memory!\n");
+ int ret = fread(string, fsize, 1, f);
+
+ if (ret != 1) {
+ free(string);
+ fatal("can't read file: %s\n", strerror(errno));
+ }
+
+ string[fsize] = 0;
+ return string;
+}
+
+static char *read_path(const char *path)
+{
+ debug("reading from %s\n", path);
+ FILE *f = fopen(path, "rb");
+ if (!f)
+ fatal("can't open file %s: %s\n", path, strerror(errno));
+ char *string = read_file(f);
+ fclose(f);
+ return string;
+}
int main(int argc, char *argv[])
{
- printf("hello world!");
+ debug_enable(1);
+ if (argc != 2)
+ fatal("usage: %s <file>\n", argv[0]);
+
+ char *term = read_path(argv[1]);
+ char *orig_term = term;
+ all_terms = hashmap_new(sizeof(struct term *), 0, hashmap_free_term);
+ rec_blc(&term);
+
+ free(orig_term);
+ hashmap_free(all_terms);
return 0;
}
diff --git a/tests/1.in b/tests/1.in
deleted file mode 100644
index 770aae2..0000000
--- a/tests/1.in
+++ /dev/null
@@ -1 +0,0 @@
-([((1 0) 0)] ([[([0] 0)]] [([(0 0)] [(0 0)])]))
diff --git a/tests/1.red b/tests/1.red
deleted file mode 100644
index 73dac44..0000000
--- a/tests/1.red
+++ /dev/null
@@ -1 +0,0 @@
-((0 [0]) [0])
diff --git a/tests/1.trans b/tests/1.trans
deleted file mode 100644
index e87943a..0000000
--- a/tests/1.trans
+++ /dev/null
@@ -1 +0,0 @@
-12611493126257126345B5A948A
diff --git a/tests/2.in b/tests/2.in
deleted file mode 100644
index 3739629..0000000
--- a/tests/2.in
+++ /dev/null
@@ -1 +0,0 @@
-(([[(([([[((1 0) [[[0]]])]] ((((0 [[(((0 ([([(0 [[0]])] ((((0 (([[[((0 2) 1)]]] [[[[3]]]]) [[[[(2 3)]]]])) [(0 [[(([[[((0 2) 1)]]] ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] 0))]])]) [(0 [[(([[[((0 2) 1)]]] ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] 1))]])]) [(0 [[(([[[((0 2) 1)]]] ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] 1))]])]))] (([(0 0)] [[((((0 [[[[3]]]]) [([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))]) [([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))]) [([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))])]]) 1))) ([([(0 [[0]])] ((((0 (([[[((0 2) 1)]]] [[[[3]]]]) [[[[(1 3)]]]])) [(0 [[(([[[((0 2) 1)]]] ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] 1))]])]) [(0 [[(([[[((0 2) 1)]]] ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] 0))]])]) [(0 [[(([[[((0 2) 1)]]] ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] 1))]])]))] (([(0 0)] [[((((0 [[[[3]]]]) [([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))]) [([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))]) [([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))])]]) 1))) (([(0 0)] [[((((0 [[[[3]]]]) [([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))]) [([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))]) [([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))])]]) 1))]]) [[[((((1 ([(((1 ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[2]]]))) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]])))] 1)) [(((1 ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[2]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[2]]])))]) [(([[[[[[((((5 2) 1) 0) ((((4 3) 2) 1) 0))]]]]]] 1) ((3 0) [[[0]]]))]) [(((1 ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[2]]]))) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]])))])]]]) [[[((((1 ([(((1 ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[1]]]))) ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]])))] 1)) [(([[[[[[((((5 2) 1) 0) ((((4 3) 2) 1) 0))]]]]]] 1) ((3 0) [[[0]]]))]) [(((1 ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[1]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[1]]])))]) [(((1 ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[1]]]))) ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]])))])]]]) [[[((((1 ([(([[[[[[((((5 2) 1) 0) ((((4 3) 2) 1) 0))]]]]]] 1) ((3 0) [[[0]]]))] 1)) [(((1 ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[2]]]))) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]])))]) [(((1 ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[1]]]))) ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]])))]) [(([[[[[[((((5 2) 1) 0) ((((4 3) 2) 1) 0))]]]]]] 1) ((3 0) [[[0]]]))])]]]))] 1) ([((((0 [[[[3]]]]) [[[[[(2 4)]]]]]) [[[[[(1 4)]]]] ]) [[[[[(0 4)]]]]])] 0))]] [[[[(2 (2 (1 3)))]]]]) [[[[(1 3)]]]])
diff --git a/tests/2.red b/tests/2.red
deleted file mode 100644
index bc83b7c..0000000
--- a/tests/2.red
+++ /dev/null
@@ -1 +0,0 @@
-[[[[(0 (2 (1 3)))]]]]
diff --git a/tests/2.trans b/tests/2.trans
deleted file mode 100644
index 60fda1e..0000000
--- a/tests/2.trans
+++ /dev/null
@@ -1 +0,0 @@
-11262611261262611311113325562626261325625626111133126111133255626262613256255626262613256112626272727271111332556262634591111311314625626111133332555562626263126111325626263126255562626261345911113113132562562611113345562626263126111325626263126255562626261334559111131133255626111325626263112613256261111333455562626263255562626263334555AAAB5B5B5B5
diff --git a/tests/3.in b/tests/3.in
deleted file mode 100644
index 6f1170d..0000000
--- a/tests/3.in
+++ /dev/null
@@ -1 +0,0 @@
-(([([(1 [((1 1) 0)])] [(1 [((1 1) 0)])])] [[((([((0 [[[0]]]) [[1]])] 0) [[(1 0)]]) (([[[(2 (1 0))]]] 0) (1 ([[[(((2 [[(0 (1 3))]]) [1]) [0])]]] 0))))]]) [[(1 (1 (1 0)))]])
diff --git a/tests/3.red b/tests/3.red
deleted file mode 100644
index 9c57852..0000000
--- a/tests/3.red
+++ /dev/null
@@ -1 +0,0 @@
-[[(1 (1 (1 (1 (1 (1 0))))))]]
diff --git a/tests/3.trans b/tests/3.trans
deleted file mode 100644
index 051c200..0000000
--- a/tests/3.trans
+++ /dev/null
@@ -1 +0,0 @@
-1126126132562611126113325562613256262631126262571345627131313256113256146261112611333126255562611134562613256261325631314625613325562562631126262556134562561114626132562613256313146256133131325611345614626111261133312625556261113456261114626132562613256313146256133255625613256313131462561345625613325562562631126262556134562556111462611146261325626132563131462561332556256132563131314625613456256133131325611345614626111261133312625556261113456261114626111462613256261325631314625613325562561325631313146256134562561332556256132563131313325563255632556325562632556255613334555931313325563255631314625613456111462611146261325626132563131462561332556256132563131314625613456256134561493131332556325563133255631461114626132562613256313146256134561114626111462613256261325631314625613325562561325631313146256134562561345614931313325563255631314625613456111462611146261325626132563131462561332556256132563131314625613456256134561493131332556325563133255631461114626132562613256313146256134561114626111462613256261325631314625613325562561325631313146256134562561345614931313325563255631314625613456111462611146261325626132563131462561332556256132563131314625613456256134561493131332556325563133255634555A555A55555A555A55555A555A55B5B5
diff --git a/tests/4.in b/tests/4.in
deleted file mode 100644
index 0c5b6bf..0000000
--- a/tests/4.in
+++ /dev/null
@@ -1 +0,0 @@
-((([([(1 [((1 1) 0)])] [(1 [((1 1) 0)])])] [[[((([((0 [[[[[0]]]]]) [[1]])] 1) 0) (([[[((0 2) 1)]]] ([(0 [[1]])] 1)) ((2 ([(0 [[0]])] 1)) 0)))]]]) (([[[((0 2) 1)]]] [[[[(1 3)]]]]) (([[[((0 2) 1)]]] [[[[(2 (1 3))]]]]) (([[[((0 2) 1)]]] [[[[(0 (1 3))]]]]) [[0]])))) (([[[((0 2) 1)]]] [[[[(1 (1 3))]]]]) [[0]]))
diff --git a/tests/4.red b/tests/4.red
deleted file mode 100644
index 41ccaf2..0000000
--- a/tests/4.red
+++ /dev/null
@@ -1 +0,0 @@
-[((0 [[[[(1 3)]]]]) [((0 [[[[(2 (1 3))]]]]) [((0 [[[[(0 (1 3))]]]]) [((0 [[[[(1 (1 3))]]]]) [[0]])])])])]
diff --git a/tests/4.trans b/tests/4.trans
deleted file mode 100644
index a674bad..0000000
--- a/tests/4.trans
+++ /dev/null
@@ -1 +0,0 @@
-11126126132562626111261133112626255611325626262626311262625711493126134561132562633255572727271494AB5B5B5B5A93113256113256146262611126113331261345611325626331126262555556113256262626263112626255711493126134561132562633255572727271491494AAB5B5B5B5A93113256113456146262611126113331261345611325626331126262555556113256262626263112626255711493126134561132562633255572727271491494AAB5B5B5B5A93113256113456146262611126113331261345611325626332555556263256263333311262625555557114932572727271491494AAB5B5B5B5A93257274B5B5AB5AB5AB5AB5
diff --git a/tests/5.in b/tests/5.in
deleted file mode 100644
index 544aef9..0000000
--- a/tests/5.in
+++ /dev/null
@@ -1 +0,0 @@
-((([([(1 [((1 1) 0)])] [(1 [((1 1) 0)])])] [[[((([((0 [[[[[0]]]]]) [[1]])] 0) [[0]]) ((([((((0 [[1]]) [[[0]]]) [[[0]]]) [0])] 1) [[0]]) (([[[((0 2) 1)]]] ([(0 [[1]])] 0)) ((2 ([([(0 [[0]])] ((((0 (([[[((0 2) 1)]]] [[[[3]]]]) [[[[(2 3)]]]])) [(0 [[(([[[((0 2) 1)]]] ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] 0))]])]) [(0 [[(([[[((0 2) 1)]]] ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] 1))]])]) [(0 [[(([[[((0 2) 1)]]] ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] 1))]])]))] 1)) ([(0 [[0]])] 0)))))]]]) [[[[(0 (2 (1 3)))]]]]) (([([(1 [((1 1) 0)])] [(1 [((1 1) 0)])])] [[((([([(1 [((1 1) 0)])] [(1 [((1 1) 0)])])] [[[((([((0 [[[[[0]]]]]) [[1]])] 1) 0) (([[[((0 2) 1)]]] ([(0 [[1]])] 1)) ((2 ([(0 [[0]])] 1)) 0)))]]]) 0) (1 0))]]) [((0 [((0 [[1]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[1]]) [((0 [[1]]) [((0 [[0]]) [[0]])])])])])])])])]) [((0 [((0 [[0]]) [((0 [[1]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[1]]) [((0 [[1]]) [((0 [[0]]) [[0]])])])])])])])])]) [[0]])])]))
diff --git a/tests/5.red b/tests/5.red
deleted file mode 100644
index 78cc9df..0000000
--- a/tests/5.red
+++ /dev/null
@@ -1 +0,0 @@
-[((0 [((0 [[1]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[1]]) [((0 [[1]]) [((0 [[0]]) [[0]])])])])])])])])]) [((0 [((0 [[0]]) [((0 [[1]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[1]]) [((0 [[1]]) [((0 [[0]]) [[0]])])])])])])])])]) [((0 [((0 [[1]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[1]]) [((0 [[1]]) [((0 [[0]]) [[0]])])])])])])])])]) [((0 [((0 [[0]]) [((0 [[1]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[1]]) [((0 [[1]]) [((0 [[0]]) [[0]])])])])])])])])]) [((0 [((0 [[1]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[1]]) [((0 [[1]]) [((0 [[0]]) [[0]])])])])])])])])]) [((0 [((0 [[0]]) [((0 [[1]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[1]]) [((0 [[1]]) [((0 [[0]]) [[0]])])])])])])])])]) [[0]])])])])])])]
diff --git a/tests/5.trans b/tests/5.trans
deleted file mode 100644
index 0dd30cd..0000000
--- a/tests/5.trans
+++ /dev/null
@@ -1 +0,0 @@
-111261261325626261112611331126126132562611126126132562626111261133325556113256262626263112626255561132562626262631112611113325562626261325631325625626311262625571149312613456113256263312613456113256263255557114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927274B5B5AB5AB5AB5AB5AB5AB5AB5AB5A93113256113256146262611126113312613456113256263311325611325614626261112611333126134561132562632555561132562626262631126262555556113256262626263111261111333126126131111345626262613256131325613132561331126262556113256261126262561132562611262625611325626112626256113256263312625555562626261325626263112626255571149312613456113256263312613456113256263255557114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927274B5B5AB5AB5AB5AB5AB5AB5AB5AB5A931132561134561462626111261133126134561132562633113256113456146262611126113331261345611325626325555626325626333313256113256146261112612613256262611126113333455556113256262626263112626255555555561132562626262631112611113331261261311113456262626132561311113331262555626262613456131111333126255562626261333255561311113332555626262633331126262555556113256261126262561132562611262625611325626112626256113256263312625555562626261325626263112626255571149312613456113256263312613456113256263255557114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927274B5B5AB5AB5AB5AB5AB5AB5AB5AB5A931132561134561462626111261133126134561132562633113256113256146262611126113331261345611325626325555611325626262626311262625555561132562626262631112611113331261261311113456262626132561311113331262555626262613456131111333126255562626261333255561311113332555626262633331126262555556113256261126262561132562611262625611325626112626256113256263312625555562626261325631111333126255562626261332556256263112626255571149312613456113256263312613456113256263255557114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927274B5B5AB5AB5AB5AB5AB5AB5AB5AB5A931132561134561462626111261133126134561132562633113256113456146262611126113331261345611325626325555626325626333313256113456146261112612613256262611126113333455556113256262626263112626255555555561132562626262631112611113331261261311113456262626132561311114626262613325561311113331262555626262613345561311113332555626262633331126262555556113256261126262561132562611262625611325626112626256113256263312625555562626261325626263112626255571149312613456113256263312613456113256263255557114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927274B5B5AB5AB5AB5AB5AB5AB5AB5AB5A93113256113456146262611126113312613456113256263311325611325614626261112611333126134561132562632555561132562626262631126262555556113256262626263111261111333126126131111345626262613256131111333126255562626261332556131111333126255562626261333255561311113332555626262633331126262555556113256261126262561132562611262625611325626112626256113256263312625555562626261325626263112626255571149312613456113256263312613456113256263255557114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927114927274B5B5A927274B5B5AB5AB5AB5AB5AB5AB5AB5AB5A931132561134561462626111261133126134561132562633113256113456146262611126113331261345611325626325555626325626333313256113456146261112612613256262611126113333455556113256262626263112626255555555561132562626262631112611113331261261311113456262626132561311113331262555626262613325561311113331262555626262613456131111333255562626263333112626255555611325626112626256113256261126262561132562611262625611325626331262555556262626132563111133312625556262626134563111133312625556262626134563111133325556262626333325555555626325557274B5B5AB5AB5AB5AB5AB5AB5
diff --git a/tests/6.in b/tests/6.in
deleted file mode 100644
index 300b8ad..0000000
--- a/tests/6.in
+++ /dev/null
@@ -1 +0,0 @@
-((([([(1 (0 0))] [(1 (0 0))])] [[[((1 ((0 [[0]]) ([[1]] [[1]]))) [((1 [[1]]) [((4 1) 0)])])]]]) (([([(1 (0 0))] [(1 (0 0))])] [[((0 ([[[(0 2)]]] [[1]])) [((([([(1 (0 0))] [(1 (0 0))])] [[[((1 [[1]]) [((([([(1 (0 0))] [(1 (0 0))])] [[[((1 0) [([[[(0 2)]]] ((3 0) 1))])]]]) 1) ((3 0) 1))])]]]) 1) (2 0))])]]) ((([([(1 (0 0))] [(1 (0 0))])] [[[((1 0) [([[[(0 2)]]] ((3 0) 1))])]]]) ([[[(0 2)]]] ([[[(0 2)]]] ([[[(0 2)]]] [[1]])))) ([[[(0 2)]]] ([[[(0 2)]]] ([[[(0 2)]]] [[1]])))))) ((([([(1 (0 0))] [(1 (0 0))])] [[[((1 0) [([[[(0 2)]]] ((3 0) 1))])]]]) (([([(1 (0 0))] [(1 (0 0))])] [[((0 [[1]]) [((([([(1 (0 0))] [(1 (0 0))])] [[[((1 0) [([[[(0 2)]]] ((3 0) 1))])]]]) 1) (2 0))])]]) ([[[(0 2)]]] ((([([(1 (0 0))] [(1 (0 0))])] [[[((1 [[1]]) [((([([(1 (0 0))] [(1 (0 0))])] [[[((1 0) [([[[(0 2)]]] ((3 0) 1))])]]]) 1) ((3 0) 1))])]]]) ((([([(1 (0 0))] [(1 (0 0))])] [[[((1 0) [([[[(0 2)]]] ((3 0) 1))])]]]) ([[[(0 2)]]] ([[[(0 2)]]] ([[[(0 2)]]] [[1]])))) ([[[(0 2)]]] ([[[(0 2)]]] ([[[(0 2)]]] [[1]]))))) ((([([(1 (0 0))] [(1 (0 0))])] [[[((1 0) [([[[(0 2)]]] ((3 0) 1))])]]]) ([[[(0 2)]]] ([[[(0 2)]]] ([[[(0 2)]]] [[1]])))) ([[[(0 2)]]] ([[[(0 2)]]] ([[[(0 2)]]] [[1]])))))))) ((([([(1 (0 0))] [(1 (0 0))])] [[[((1 0) [([[[(0 2)]]] ((3 0) 1))])]]]) ((([([(1 (0 0))] [(1 (0 0))])] [[[((1 0) [([[[(0 2)]]] ((3 0) 1))])]]]) ([[[(0 2)]]] ([[[(0 2)]]] ([[[(0 2)]]] [[1]])))) ([[[(0 2)]]] ([[[(0 2)]]] ([[[(0 2)]]] [[1]]))))) ((([([(1 (0 0))] [(1 (0 0))])] [[[((1 0) [([[[(0 2)]]] ((3 0) 1))])]]]) ((([([(1 (0 0))] [(1 (0 0))])] [[[((1 0) [([[[(0 2)]]] ((3 0) 1))])]]]) ([[[(0 2)]]] ([[[(0 2)]]] ([[[(0 2)]]] [[1]])))) ([[[(0 2)]]] ([[[(0 2)]]] ([[[(0 2)]]] [[1]]))))) ((([([(1 (0 0))] [(1 (0 0))])] [[[((1 0) [([[[(0 2)]]] ((3 0) 1))])]]]) ([[[(0 2)]]] ([[[(0 2)]]] [[1]]))) ([[[(0 2)]]] ([[[(0 2)]]] ([[[(0 2)]]] [[1]]))))))))
diff --git a/tests/6.red b/tests/6.red
deleted file mode 100644
index e6fb909..0000000
--- a/tests/6.red
+++ /dev/null
@@ -1 +0,0 @@
-[[0]]
diff --git a/tests/6.trans b/tests/6.trans
deleted file mode 100644
index e6f9a94..0000000
--- a/tests/6.trans
+++ /dev/null
@@ -1 +0,0 @@
-1112612613256262611311261261325626113111261261325626261131262562613256126256261325611126126132562626113456261325611126126132562626113313132561462561133311313256146256261133312625556261325612625556261325611126126132562626113456261325611126126132562626113313134561462561133311313456146256261133312625556261325612625556261325611126126132562626113456261325611126126132562626113313134561462561133311313456146256261133325556263333312625555555562613256111261261325626261134562613256111261261325626261133131345614625611333126255562613256111261261325626261134562613256111261261325626261133131345614625611333126255562613256111261261325626261134562613256111261261325626261133131345614625611333255562631262555626132561262556261325612625562613256126255626132561262556261325612625562613256126256261325611311126126132562626113112612613256261131262562613256111261261325626261134562613256126256261325612625626132561131325614625626113331131325614625626113331131325614625626113331131325614625626113331131325614625626113331131325614625626113331131325614625626113332555626333113132561462562611334556263255555556263331131325614625626113345562613256111261261325626261133455626132561262555555626132561262555626132561262555626132561262555626132561262555626132561133311313256146256261133311313256146256261133311126126132562626113111261261325626261131262562613256126256261325611126126132562626113311126126132562626113126256261325612625562613256126255562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611333113134561462562611333113134561462562611333113132561462562611334556263331131345614625626113345562632555555562633331131325614625626113345562613256111261261325626261133455626132561262555555562613256126255562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131325614625626113331131325614625626113331262555626132561262555626132561262555626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113331131345614625626113331131325614625626113345562613256126255562613256126255562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131345614625626113331131345614625626113331262555626132561262555626132561262555626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113331131345614625626113331131345614625626113345562633331131345614625626113345562613256111261261325626261133455626132561262555555562613256126255562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131345614625626113331131345614625626113332555626333331262555555556261325612625556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133311313456146256261133311313256146256261133455626132561262555626132561262555626132561262555626132561262555626132561133311313456146256261133311313456146256261133311313456146256261133312625556261325612625556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133311313456146256261133311313456146256261133455626333311313456146256261133455626325555555562633333333113132561462562611334556261325611126126132562626113345562613256126255555555555626132561262555626132561262555626132561133311313456146256261133311313456146256261133311313456146256261133312625556261325612625556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133311313256146256261133455626132561262555626132561262555626132561262555626132561133311313456146256261133311313456146256261133311313456146256261133325556263333333311313256146256261133311313256146256261133312625556261325612625556261325611126126132562626113345562613256126255555555555626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131325614625626113345562613256126255562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325612625556261325611333113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561262555626132561133311313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611333113134561462562611334556263333333311313456146256261133455626132561112612613256262611334556261325612625555555555562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611333113132561462562611334556261325612625556261325612625556261325612625556261325611333113134561462562611333113134561462562611333113134561462562611334556263333333311313456146256261133311313456146256261133312625556261325612625556261325611126126132562626113345562613256126255555555555626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131325614625626113345562613256126255562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325612625556261325611333113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561262555626132561133311313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611333113134561462562611334556263333333311313456146256261133455626132561112612613256262611334556261325612625555555555562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611333113132561462562611334556261325612625556261325612625556261325612625556261325611333113134561462562611333113134561462562611333113134561462562611334556263333333311313456146256261133311313456146256261133325556263333312625555555562613256111261261325626261133455626132561262555555555556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561262555626132561133311313456146256261133311313456146256261133311313256146256261133455626132561262555626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325612625556261325611333113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561262555626132561133311313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113331131345614625626113345562633333333113134561462562611334556263255555555555562633333333333333333333333333113132561462562611334556261325611126126132562626113345562613256126255555555555555555555555555555626132561262555626132561133311313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561262555626132561131345614625626113331131345614625626113331131325614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131345614625626113345562633333333113134561462562611333126255562613256111261261325626261133455626132561262555555555556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133311313256146256261133455626132561262555626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611333113134561462562611334556263333333311313456146256261133312625556261325611126126132562626113345562613256126255555555555626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131325614625626113345562613256126255562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133311313456146256261133455626333333331131345614625626113332555626325555555555556263333333333333333333333333333333333333331313256146256113345562613256111261261325626261134562613256126255555555555555555555555555555555555555555562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113132561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626333333333333333333333333331131345614625626113345562613256111261261325626261133455626132561262555555555555555555555555555556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313256146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556263333333333333333333333333311313456146256261133455626132561112612613256262611334556261325612625555555555555555555555555555562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113132561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556263333333333333333333333333333333333333313134561462561133455626132561112612613256262611345626132561262555555555555555555555555555555555555555556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562633333333333333333333333333113134561462562611334556261325611126126132562626113345562613256126255555555555555555555555555555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131325614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626333333333333333333333333333333333333313134561462561133455626132561112612613256262611345626132561262555555555555555555555555555555555555555562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113132561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133311313456146256261133455626132561262555626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113331131345614625626113345562633333333333333333333333333113134561462562611334556263255555555555555555555555555555562633333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333113132561462562611334556261325611126126132562626113345562613256126255555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131325614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562633333333333333333333333333333333333313134561462561133455626132561112612613256262611345626132561262555555555555555555555555555555555555555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131325614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626333333333333333333333333333333333331313456146256113345562613256111261261325626261134562613256126255555555555555555555555555555555555555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131325614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556263333333333333333333333333333333333131345614625611334556261325611126126132562626113456261325612625555555555555555555555555555555555555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131325614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562633333333333333333333333333333333313134561462561133455626132561112612613256262611345626132561262555555555555555555555555555555555555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131325614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556263333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333311313456146256261133455626132561112612613256262611334556261325612625555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113132561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556263333333333333333333333333333333313134561462561133455626132561112612613256262611345626132561262555555555555555555555555555555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562633333333333333333333333333333331313456146256113345562613256111261261325626261134562613256126255555555555555555555555555555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626333333333333333333333333333333131345614625611334556261325611126126132562626113456261325612625555555555555555555555555555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556263333333333333333333333333333313134561462561133455626132561112612613256262611345626132561262555555555555555555555555555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562633333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333113134561462562611334556261325611126126132562626113345562613256126255555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131325614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626333333333333333333333333333313134561462561133455626132561112612613256262611345626132561262555555555555555555555555555555562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113132561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556263333333333333333333333333331313456146256113345562613256111261261325626261134562613256126255555555555555555555555555555562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113132561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562633333333333333333333333333131345614625611334556261325611126126132562626113456261325612625555555555555555555555555555562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113132561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626333333333333333333333333313134561462561133455626132561112612613256262611345626132561262555555555555555555555555555562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113132561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556263333333333333333333333331313456146256113345562613256111261261325626261134562613256126255555555555555555555555555562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113132561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333331131345614625626113345562613256111261261325626261133455626132561262555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313256146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626333333333333333333333331313456146256113345562613256111261261325626261134562613256126255555555555555555555555555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131325614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556263333333333333333333333131345614625611334556261325611126126132562626113456261325612625555555555555555555555555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131325614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562633333333333333333333313134561462561133455626132561112612613256262611345626132561262555555555555555555555555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131325614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626333333333333333333331313456146256113345562613256111261261325626261134562613256126255555555555555555555555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131325614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556263333333333333333333131345614625611334556261325611126126132562626113456261325612625555555555555555555555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131325614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562633333333333333333313134561462561133455626132561112612613256262611345626132561262555555555555555555555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131325614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626333333333333333331313456146256113345562613256111261261325626261134562613256126255555555555555555555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131325614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556263333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333311313456146256261133455626132561112612613256262611334556261325612625555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113132561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562633333333333333331313456146256113345562613256111261261325626261134562613256126255555555555555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626333333333333333131345614625611334556261325611126126132562626113456261325612625555555555555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556263333333333333313134561462561133455626132561112612613256262611345626132561262555555555555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562633333333333331313456146256113345562613256111261261325626261134562613256126255555555555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626333333333333131345614625611334556261325611126126132562626113456261325612625555555555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556263333333333313134561462561133455626132561112612613256262611345626132561262555555555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562633333333331313456146256113345562613256111261261325626261134562613256126255555555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626333333333131345614625611334556261325611126126132562626113456261325612625555555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556263333333313134561462561133455626132561112612613256262611345626132561262555555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562633333331313456146256113345562613256111261261325626261134562613256126255555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556261325612625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313456146256261133455626333333131345614625611334556261325611126126132562626113456261325612625555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611334556263333313134561462561133455626132561112612613256262611345626132561262555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113345562633331313456146256113345562613256111261261325626261134562613256126255555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133311313256146256261133455626333131345614625611334556263255555556263333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333331112612613256262611311126126132562626113126256261325612625626132561262555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555626132561131345614625626113331131345614625626113345562613256126255562613256113331131325614625626113331131325614625626113331262555626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113331262555626132561262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331131345614625626113332555626333331262555555556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133312625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133312625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133325556263333333311126126132562626113111261261325626261131262562613256126256261325612625555555555562613256113134561462562611333113134561462562611334556261325612625556261325611333113132561462562611333113132561462562611333126255562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611333126255562613256126255562613256126255562613256113134561462562611333113134561462562611334556261325612625556261325611333113134561462562611333113134561462562611333255562633333126255555555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113331262555626132561262555626132561131345614625626113331131345614625626113345562613256126255562613256113331131345614625626113332555626333333331112612613256262611312625626132561262555555555556261325611313456146256261133311313456146256261133455626132561262555626132561133311313256146256261133312625556261325612625556261325611313456146256261133311313456146256261133455626132561262555626132561133311313456146256261133325556263333126255555556261325611313456146256261133311313456146256261133455626132561262555626132561133312625556261325611313456146256261133311313456146256261133455626132561262555626132561133312625556261325611313456146256261133311313456146256261133455626333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333331131345614625626113345562632555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555626311333255562632557274B5B5
diff --git a/tests/readme.md b/tests/readme.md
deleted file mode 100644
index 9782650..0000000
--- a/tests/readme.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Tests
-
-These tests don't really test *specific* transition rules although I
-used them to fix specific rules using TDD. They are still useful as
-*random* overall reduction tests or for general benchmarking.
-
-## Descriptions
-
-1. Smallest expression that uses all transition rules\[0\]
-2. Folds a list of balanced ternary numbers:
- `foldl + 0 [1, 2, 3] ~~> 6`
-3. Factorial function using church numerals and the z combinator
-4. Appends two lists of balanced ternary numbers:
- `[1, 2, 3] ++ [4] ~~> [1, 2, 3, 4]`
-5. Inifinite lazy list generators, list-based string representation and
- generator management using balanced ternary numbers. Basically
- equivalent of `(take (+6) (cycle "ab")) ~~> "ababab"`
-6. Stress test using factorial equalities, originally by Lennart
- Augustsson