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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: A = None
        self.z: A = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: J = None
        self.x: J = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.o: J = None
        self.u: A = None
        self.v: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: C = None
        self.t: A = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: A = None
        self.z: A = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: J = None
        self.x: J = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.o: J = None
        self.u: A = None
        self.v: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: C = None
        self.t: A = None
        self.u: C = None
        self.txt = txt

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

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