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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.x: B = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: A = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: E = None
        self.x: E = None
        self.s: E = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: D = None
        self.s: I = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: E = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.x: B = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: A = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: E = None
        self.x: E = None
        self.s: E = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: D = None
        self.s: I = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: E = None
        self.r: D = None
        self.txt = txt

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

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

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