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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: A = None
        self.y: G = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: C = None
        self.q: E = None
        self.y: J = None
        self.z: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: A = None
        self.z: E = None
        self.t: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: A = None
        self.y: G = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: C = None
        self.q: E = None
        self.y: J = None
        self.z: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: A = None
        self.z: E = None
        self.t: A = None
        self.txt = txt

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

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