class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: D = None
        self.q: F = None
        self.v: G = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: C = None
        self.z: E = None
        self.p: G = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

m = A("m")
h = B("h")
k = C("k")
g = D("g")
a = E("a")
d = F("d")
n = G("n")
j = B("j")
l = F("l")

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: C = None
        self.z: E = None
        self.p: G = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

m = A("m")
h = B("h")
k = C("k")
g = D("g")
a = E("a")
d = F("d")
n = G("n")
j = B("j")
l = F("l")

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