class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: C = None
        self.r: G = None
        self.t: H = None
        self.p: G = None
        self.v: J = None
        self.w: C = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: H = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: F = None
        self.w: A = None
        self.q: B = None
        self.v: G = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: J = None
        self.x: G = None
        self.s: H = None
        self.z: I = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: I = None
        self.p: I = None
        self.o: G = None
        self.s: I = None
        self.y: I = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: C = None
        self.x: C = None
        self.s: F = None
        self.w: G = None
        self.t: H = None
        self.v: D = None
        self.u: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: H = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: F = None
        self.w: A = None
        self.q: B = None
        self.v: G = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: J = None
        self.x: G = None
        self.s: H = None
        self.z: I = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: I = None
        self.p: I = None
        self.o: G = None
        self.s: I = None
        self.y: I = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: C = None
        self.x: C = None
        self.s: F = None
        self.w: G = None
        self.t: H = None
        self.v: D = None
        self.u: H = None
        self.txt = txt

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

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