class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: F = None
        self.s: E = None
        self.u: A = None
        self.v: A = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: F = None
        self.s: E = None
        self.u: A = None
        self.v: A = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: D = None
        self.txt = txt

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

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