class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: J = None
        self.p: F = None
        self.v: D = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: I = None
        self.s: F = None
        self.p: F = None
        self.t: F = None
        self.v: G = None
        self.z: C = None
        self.o: H = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: E = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: G = None
        self.y: A = None
        self.p: J = None
        self.q: I = None
        self.v: A = None
        self.w: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: D = None
        self.r: I = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: I = None
        self.s: F = None
        self.p: F = None
        self.t: F = None
        self.v: G = None
        self.z: C = None
        self.o: H = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: E = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: G = None
        self.y: A = None
        self.p: J = None
        self.q: I = None
        self.v: A = None
        self.w: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: D = None
        self.r: I = None
        self.u: B = None
        self.txt = txt

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

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