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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: G = None
        self.o: A = None
        self.z: F = None
        self.u: C = None
        self.w: D = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: E = None
        self.txt = txt

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

m = A("m")
l = B("l")
i = C("i")
g = D("g")
b = E("b")
a = F("a")
h = G("h")
d = G("d")
j = E("j")
f = C("f")

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: G = None
        self.o: A = None
        self.z: F = None
        self.u: C = None
        self.w: D = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: E = None
        self.txt = txt

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

m = A("m")
l = B("l")
i = C("i")
g = D("g")
b = E("b")
a = F("a")
h = G("h")
d = G("d")
j = E("j")
f = C("f")

m.t = a
m.u = l
m.o = f
m.q = j
m.w = g
l.z = j
i.p = l
i.s = d
i.o = m
i.z = a
i.t = a
i.u = f
i.w = g
g.w = a
g.r = a
g.u = m
g.v = b
g.y = b
g.p = h
g.t = j
b.z = m
b.q = m
b.v = l
b.u = l
b.s = i
b.w = i
a.o = i
a.u = b
h.p = g
h.r = g
h.y = l
h.z = l
h.v = l
h.s = d
h.q = a
d.p = g
d.r = g
d.y = l
d.z = l
d.v = l
d.s = h
d.q = a
j.z = m
j.q = m
j.v = l
j.u = l
j.s = i
j.w = i
f.p = l
f.s = h
f.o = m
f.z = a
f.t = a
f.u = i
f.w = g
assert m.q.v.z.v.z.txt == "j"