class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: D = None
        self.z: G = None
        self.u: G = None
        self.q: C = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.v: B = None
        self.x: D = None
        self.y: A = None
        self.s: E = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: G = None
        self.o: A = None
        self.w: G = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: A = None
        self.q: A = None
        self.w: B = None
        self.r: F = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: B = None
        self.y: E = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.s: E = None
        self.y: E = None
        self.q: A = None
        self.x: B = None
        self.o: B = None
        self.v: A = None
        self.txt = txt

l = A("l")
e = B("e")
b = C("b")
k = D("k")
m = E("m")
c = F("c")
a = G("a")
f = H("f")

l.t = b
l.q = b
e.x = k
e.s = k
e.z = a
e.u = a
e.q = b
e.t = f
b.p = m
b.s = m
b.u = l
b.y = l
b.v = e
b.x = k
b.w = a
k.y = c
k.z = a
k.w = a
k.o = l
k.q = l
m.z = c
m.r = c
m.s = l
m.q = l
m.u = l
m.w = e
c.o = f
c.t = f
c.u = e
c.y = m
a.o = c
f.u = m
f.s = m
f.y = m
f.p = l
f.q = l
f.v = l
f.x = e
f.o = e
assert f.s.z.y.u.q.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: D = None
        self.z: G = None
        self.u: G = None
        self.q: C = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.v: B = None
        self.x: D = None
        self.y: A = None
        self.s: E = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: G = None
        self.o: A = None
        self.w: G = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: A = None
        self.q: A = None
        self.w: B = None
        self.r: F = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: B = None
        self.y: E = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.s: E = None
        self.y: E = None
        self.q: A = None
        self.x: B = None
        self.o: B = None
        self.v: A = None
        self.txt = txt

l = A("l")
e = B("e")
b = C("b")
k = D("k")
m = E("m")
c = F("c")
a = G("a")
f = H("f")

l.t = b
l.q = b
e.x = k
e.s = k
e.z = a
e.u = a
e.q = b
e.t = f
b.p = m
b.s = m
b.u = l
b.y = l
b.v = e
b.x = k
b.w = a
k.y = c
k.z = a
k.w = a
k.o = l
k.q = l
m.z = c
m.r = c
m.s = l
m.q = l
m.u = l
m.w = e
c.o = f
c.t = f
c.u = e
c.y = m
a.o = c
f.u = m
f.s = m
f.y = m
f.p = l
f.q = l
f.v = l
f.x = e
f.o = e
assert f.s.z.y.u.q.w.txt == "a"