class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: C = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: F = None
        self.r: G = None
        self.p: C = None
        self.w: F = None
        self.q: D = None
        self.z: E = None
        self.txt = txt

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

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

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

a = A("a")
m = B("m")
c = C("c")
h = D("h")
k = E("k")
e = F("e")
d = G("d")
j = D("j")

a.u = m
a.z = m
a.y = c
a.q = d
m.r = k
m.o = k
m.t = a
c.u = e
c.x = k
c.o = k
c.v = m
c.s = j
h.x = e
h.t = e
h.w = e
h.r = d
h.p = c
h.q = j
h.z = k
k.u = c
k.p = d
k.r = d
k.s = d
k.z = d
k.o = j
k.v = a
e.u = j
d.x = j
d.z = j
d.s = c
d.v = h
d.q = h
d.o = e
d.r = m
j.x = e
j.t = e
j.w = e
j.r = d
j.p = c
j.q = h
j.z = k
assert j.q.q.z.o.q.q.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: C = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: F = None
        self.r: G = None
        self.p: C = None
        self.w: F = None
        self.q: D = None
        self.z: E = None
        self.txt = txt

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

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

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

a = A("a")
m = B("m")
c = C("c")
h = D("h")
k = E("k")
e = F("e")
d = G("d")
j = D("j")

a.u = m
a.z = m
a.y = c
a.q = d
m.r = k
m.o = k
m.t = a
c.u = e
c.x = k
c.o = k
c.v = m
c.s = j
h.x = e
h.t = e
h.w = e
h.r = d
h.p = c
h.q = j
h.z = k
k.u = c
k.p = d
k.r = d
k.s = d
k.z = d
k.o = j
k.v = a
e.u = j
d.x = j
d.z = j
d.s = c
d.v = h
d.q = h
d.o = e
d.r = m
j.x = e
j.t = e
j.w = e
j.r = d
j.p = c
j.q = h
j.z = k
assert j.q.q.z.o.q.q.q.z.txt == "k"