class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: G = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: E = None
        self.v: A = None
        self.x: I = None
        self.u: H = None
        self.s: F = None
        self.t: F = None
        self.o: H = None
        self.p: B = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: H = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: C = None
        self.r: H = None
        self.t: H = None
        self.w: D = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: G = None
        self.o: F = None
        self.w: J = None
        self.z: H = None
        self.r: E = None
        self.y: D = None
        self.u: H = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

n = A("n")
i = B("i")
k = C("k")
f = D("f")
a = E("a")
c = F("c")
m = G("m")
l = H("l")
d = I("d")
e = J("e")

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: G = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: E = None
        self.v: A = None
        self.x: I = None
        self.u: H = None
        self.s: F = None
        self.t: F = None
        self.o: H = None
        self.p: B = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: H = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: C = None
        self.r: H = None
        self.t: H = None
        self.w: D = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: G = None
        self.o: F = None
        self.w: J = None
        self.z: H = None
        self.r: E = None
        self.y: D = None
        self.u: H = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

n = A("n")
i = B("i")
k = C("k")
f = D("f")
a = E("a")
c = F("c")
m = G("m")
l = H("l")
d = I("d")
e = J("e")

n.r = m
i.s = m
k.q = a
k.x = m
k.p = m
f.w = c
f.s = c
f.t = c
f.q = a
f.v = n
f.x = d
f.z = d
f.u = l
f.o = l
f.p = i
a.t = e
a.z = l
a.y = m
c.u = f
c.p = f
c.z = d
c.t = l
c.q = n
c.s = m
c.o = m
c.y = i
m.o = e
m.u = k
m.r = l
m.t = l
m.w = f
m.s = f
l.z = k
l.u = k
d.v = f
d.y = f
d.x = m
d.o = c
d.w = e
d.z = l
d.u = l
d.r = a
d.s = a
e.s = d
assert l.u.x.u.q.txt == "a"