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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: I = None
        self.o: F = None
        self.u: J = None
        self.v: J = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: A = None
        self.t: H = None
        self.u: A = None
        self.o: F = None
        self.r: I = None
        self.y: F = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: D = None
        self.q: H = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: E = None
        self.q: B = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: D = None
        self.z: E = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: C = None
        self.v: C = None
        self.o: H = None
        self.s: D = None
        self.q: H = None
        self.r: G = None
        self.p: C = None
        self.z: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: I = None
        self.o: F = None
        self.u: J = None
        self.v: J = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: A = None
        self.t: H = None
        self.u: A = None
        self.o: F = None
        self.r: I = None
        self.y: F = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: D = None
        self.q: H = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: E = None
        self.q: B = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: D = None
        self.z: E = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: C = None
        self.v: C = None
        self.o: H = None
        self.s: D = None
        self.q: H = None
        self.r: G = None
        self.p: C = None
        self.z: F = None
        self.txt = txt

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

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