class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: J = None
        self.w: B = None
        self.p: H = None
        self.x: B = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: A = None
        self.z: G = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: H = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: H = None
        self.q: B = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: E = None
        self.p: D = None
        self.x: G = None
        self.q: D = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: A = None
        self.z: G = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: H = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: H = None
        self.q: B = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: E = None
        self.p: D = None
        self.x: G = None
        self.q: D = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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