class A:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: I = None
        self.p: I = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: G = None
        self.o: E = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: H = None
        self.p: A = None
        self.x: E = None
        self.u: H = None
        self.t: F = None
        self.o: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: C = None
        self.t: A = None
        self.u: B = None
        self.z: A = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: G = None
        self.o: E = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: H = None
        self.p: A = None
        self.x: E = None
        self.u: H = None
        self.t: F = None
        self.o: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: C = None
        self.t: A = None
        self.u: B = None
        self.z: A = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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