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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.y: C = None
        self.s: G = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: I = None
        self.w: F = None
        self.r: E = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: A = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: B = None
        self.u: B = None
        self.s: B = None
        self.z: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.y: C = None
        self.s: G = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: I = None
        self.w: F = None
        self.r: E = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: A = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: B = None
        self.u: B = None
        self.s: B = None
        self.z: G = None
        self.txt = txt

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

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