class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: E = None
        self.p: C = None
        self.w: C = None
        self.y: H = None
        self.q: F = None
        self.o: D = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: C = None
        self.q: G = None
        self.x: A = None
        self.r: F = None
        self.u: D = None
        self.p: H = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: H = None
        self.p: G = None
        self.s: B = None
        self.z: D = None
        self.o: A = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: C = None
        self.o: A = None
        self.w: H = None
        self.z: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

c.z = f
c.u = j
c.s = j
c.p = i
c.w = i
c.y = b
c.q = k
c.o = l
f.z = j
f.s = j
f.v = i
f.q = a
f.x = c
f.r = k
f.u = l
f.p = b
i.u = f
i.s = f
i.q = b
i.p = a
i.w = a
i.z = l
i.o = c
l.s = c
l.y = b
j.v = b
j.w = b
j.q = i
j.o = c
j.z = k
k.o = f
k.u = f
k.x = b
a.q = b
a.p = f
b.t = j
assert b.t.w.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: E = None
        self.p: C = None
        self.w: C = None
        self.y: H = None
        self.q: F = None
        self.o: D = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: C = None
        self.q: G = None
        self.x: A = None
        self.r: F = None
        self.u: D = None
        self.p: H = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: H = None
        self.p: G = None
        self.s: B = None
        self.z: D = None
        self.o: A = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: C = None
        self.o: A = None
        self.w: H = None
        self.z: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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