class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: D = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: B = None
        self.o: B = None
        self.x: G = None
        self.v: G = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.r: G = None
        self.p: F = None
        self.y: A = None
        self.t: G = None
        self.v: G = None
        self.txt = txt

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

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

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

e = A("e")
j = B("j")
b = C("b")
d = D("d")
a = E("a")
n = F("n")
m = G("m")

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: B = None
        self.o: B = None
        self.x: G = None
        self.v: G = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.r: G = None
        self.p: F = None
        self.y: A = None
        self.t: G = None
        self.v: G = None
        self.txt = txt

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

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

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

e = A("e")
j = B("j")
b = C("b")
d = D("d")
a = E("a")
n = F("n")
m = G("m")

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