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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: A = None
        self.s: G = None
        self.o: A = None
        self.v: A = None
        self.x: F = None
        self.y: E = None
        self.q: G = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.t: I = None
        self.v: A = None
        self.p: F = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: H = None
        self.s: D = None
        self.r: E = None
        self.y: E = None
        self.t: D = None
        self.q: A = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: C = None
        self.s: H = None
        self.w: H = None
        self.q: H = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: E = None
        self.r: A = None
        self.u: A = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: D = None
        self.w: I = None
        self.s: E = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: A = None
        self.s: G = None
        self.o: A = None
        self.v: A = None
        self.x: F = None
        self.y: E = None
        self.q: G = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.t: I = None
        self.v: A = None
        self.p: F = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: H = None
        self.s: D = None
        self.r: E = None
        self.y: E = None
        self.t: D = None
        self.q: A = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: C = None
        self.s: H = None
        self.w: H = None
        self.q: H = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: E = None
        self.r: A = None
        self.u: A = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: D = None
        self.w: I = None
        self.s: E = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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