class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: F = None
        self.x: H = None
        self.r: H = None
        self.w: D = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: D = None
        self.q: G = None
        self.p: A = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: C = None
        self.y: H = None
        self.txt = txt

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

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

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

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

k = A("k")
g = B("g")
h = C("h")
n = D("n")
i = E("i")
b = F("b")
l = G("l")
a = H("a")
d = A("d")
e = B("e")

k.u = b
k.t = b
k.x = a
k.r = a
k.w = n
k.z = i
g.w = i
g.p = l
g.z = l
g.v = b
g.q = b
g.y = h
g.s = n
g.o = a
h.r = k
h.p = k
h.v = n
h.q = l
h.s = l
n.z = h
n.p = h
n.y = a
i.x = a
i.w = l
i.p = b
i.q = e
b.o = n
l.w = a
l.o = n
l.u = e
l.q = i
l.p = d
l.z = h
a.z = h
a.x = h
a.p = h
a.v = n
a.u = n
a.o = l
a.s = g
d.u = b
d.t = b
d.x = a
d.r = a
d.w = n
d.z = i
e.w = i
e.p = l
e.z = l
e.v = b
e.q = b
e.y = h
e.s = n
e.o = a
assert d.t.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: F = None
        self.x: H = None
        self.r: H = None
        self.w: D = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: D = None
        self.q: G = None
        self.p: A = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: C = None
        self.y: H = None
        self.txt = txt

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

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

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

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

k = A("k")
g = B("g")
h = C("h")
n = D("n")
i = E("i")
b = F("b")
l = G("l")
a = H("a")
d = A("d")
e = B("e")

k.u = b
k.t = b
k.x = a
k.r = a
k.w = n
k.z = i
g.w = i
g.p = l
g.z = l
g.v = b
g.q = b
g.y = h
g.s = n
g.o = a
h.r = k
h.p = k
h.v = n
h.q = l
h.s = l
n.z = h
n.p = h
n.y = a
i.x = a
i.w = l
i.p = b
i.q = e
b.o = n
l.w = a
l.o = n
l.u = e
l.q = i
l.p = d
l.z = h
a.z = h
a.x = h
a.p = h
a.v = n
a.u = n
a.o = l
a.s = g
d.u = b
d.t = b
d.x = a
d.r = a
d.w = n
d.z = i
e.w = i
e.p = l
e.z = l
e.v = b
e.q = b
e.y = h
e.s = n
e.o = a
assert d.t.o.z.txt == "h"