class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: J = None
        self.t: J = None
        self.o: I = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: E = None
        self.q: F = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: G = None
        self.w: G = None
        self.r: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: F = None
        self.v: F = None
        self.u: A = None
        self.z: B = None
        self.s: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: E = None
        self.u: H = None
        self.y: F = None
        self.q: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: J = None
        self.t: J = None
        self.o: I = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: E = None
        self.q: F = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: G = None
        self.w: G = None
        self.r: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: F = None
        self.v: F = None
        self.u: A = None
        self.z: B = None
        self.s: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: E = None
        self.u: H = None
        self.y: F = None
        self.q: F = None
        self.txt = txt

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

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

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