class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: E = None
        self.p: A = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: B = None
        self.z: D = None
        self.o: B = None
        self.w: E = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: F = None
        self.q: A = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: B = None
        self.txt = txt

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

c = A("c")
e = B("e")
k = C("k")
h = D("h")
i = E("i")
d = F("d")
a = E("a")
l = A("l")
n = D("n")
g = B("g")

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

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: B = None
        self.z: D = None
        self.o: B = None
        self.w: E = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: F = None
        self.q: A = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: B = None
        self.txt = txt

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

c = A("c")
e = B("e")
k = C("k")
h = D("h")
i = E("i")
d = F("d")
a = E("a")
l = A("l")
n = D("n")
g = B("g")

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