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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: E = None
        self.p: E = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: D = None
        self.v: B = None
        self.p: B = None
        self.y: J = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: E = None
        self.y: F = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: A = None
        self.o: D = None
        self.r: J = None
        self.t: A = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: E = None
        self.p: E = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: D = None
        self.v: B = None
        self.p: B = None
        self.y: J = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: E = None
        self.y: F = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: A = None
        self.o: D = None
        self.r: J = None
        self.t: A = None
        self.x: G = None
        self.txt = txt

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

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

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

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