class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: H = None
        self.o: C = None
        self.q: H = None
        self.v: G = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: A = None
        self.u: D = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: C = None
        self.q: I = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: A = None
        self.t: D = None
        self.q: G = None
        self.y: B = None
        self.u: F = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: A = None
        self.u: D = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: C = None
        self.q: I = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: A = None
        self.t: D = None
        self.q: G = None
        self.y: B = None
        self.u: F = None
        self.x: D = None
        self.txt = txt

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

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

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