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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: A = None
        self.o: F = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: B = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: F = None
        self.s: D = None
        self.y: F = None
        self.u: F = None
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: F = None
        self.t: F = None
        self.p: A = None
        self.u: B = None
        self.q: H = None
        self.o: F = None
        self.x: B = None
        self.y: I = None
        self.z: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: A = None
        self.o: F = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: B = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: F = None
        self.s: D = None
        self.y: F = None
        self.u: F = None
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: F = None
        self.t: F = None
        self.p: A = None
        self.u: B = None
        self.q: H = None
        self.o: F = None
        self.x: B = None
        self.y: I = None
        self.z: G = None
        self.txt = txt

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

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