class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: G = None
        self.q: C = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: E = None
        self.v: G = None
        self.x: F = None
        self.w: G = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: H = None
        self.z: B = None
        self.u: B = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: B = None
        self.q: J = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: J = None
        self.u: G = None
        self.r: G = None
        self.t: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: G = None
        self.q: C = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: E = None
        self.v: G = None
        self.x: F = None
        self.w: G = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: H = None
        self.z: B = None
        self.u: B = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: B = None
        self.q: J = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: J = None
        self.u: G = None
        self.r: G = None
        self.t: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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