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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: F = None
        self.u: C = None
        self.s: E = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: B = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: F = None
        self.u: C = None
        self.s: E = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: B = None
        self.z: B = None
        self.txt = txt

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

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

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

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