class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: B = None
        self.u: J = None
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: I = None
        self.o: B = None
        self.p: B = None
        self.s: H = None
        self.q: A = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: C = None
        self.y: H = None
        self.o: J = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: B = None
        self.u: J = None
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: I = None
        self.o: B = None
        self.p: B = None
        self.s: H = None
        self.q: A = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: C = None
        self.y: H = None
        self.o: J = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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