class A:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: G = None
        self.o: I = None
        self.u: G = None
        self.p: H = None
        self.r: G = None
        self.q: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: D = None
        self.w: A = None
        self.y: D = None
        self.o: A = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: H = None
        self.y: B = None
        self.z: A = None
        self.x: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: D = None
        self.w: A = None
        self.y: D = None
        self.o: A = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: H = None
        self.y: B = None
        self.z: A = None
        self.x: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: G = None
        self.txt = txt

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

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