class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: F = None
        self.s: A = None
        self.r: I = None
        self.x: F = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: H = None
        self.s: G = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: E = None
        self.u: D = None
        self.q: A = None
        self.t: B = None
        self.p: A = None
        self.v: D = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: A = None
        self.r: G = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: F = None
        self.s: A = None
        self.r: I = None
        self.x: F = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: H = None
        self.s: G = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: E = None
        self.u: D = None
        self.q: A = None
        self.t: B = None
        self.p: A = None
        self.v: D = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: A = None
        self.r: G = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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