class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: F = None
        self.q: I = None
        self.v: J = None
        self.s: D = None
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: C = None
        self.v: F = None
        self.o: I = None
        self.z: H = None
        self.y: E = None
        self.x: C = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: D = None
        self.v: F = None
        self.o: G = None
        self.u: G = None
        self.w: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: C = None
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: E = None
        self.y: B = None
        self.t: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: H = None
        self.x: H = None
        self.u: A = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: C = None
        self.v: F = None
        self.o: I = None
        self.z: H = None
        self.y: E = None
        self.x: C = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: D = None
        self.v: F = None
        self.o: G = None
        self.u: G = None
        self.w: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: C = None
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: E = None
        self.y: B = None
        self.t: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: H = None
        self.x: H = None
        self.u: A = None
        self.o: C = None
        self.txt = txt

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

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