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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: E = None
        self.z: F = None
        self.u: A = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: G = None
        self.r: H = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: C = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: E = None
        self.z: F = None
        self.u: A = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: G = None
        self.r: H = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: C = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

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