class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: F = None
        self.t: B = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: G = None
        self.u: F = None
        self.q: D = None
        self.w: F = None
        self.z: A = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: A = None
        self.y: D = None
        self.q: C = None
        self.s: D = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: D = None
        self.x: E = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: G = None
        self.u: F = None
        self.q: D = None
        self.w: F = None
        self.z: A = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: A = None
        self.y: D = None
        self.q: C = None
        self.s: D = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: D = None
        self.x: E = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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