class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: B = None
        self.u: D = None
        self.q: G = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: D = None
        self.r: B = None
        self.x: E = None
        self.w: B = None
        self.t: B = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: D = None
        self.r: B = None
        self.x: E = None
        self.w: B = None
        self.t: B = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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