class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: D = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: A = None
        self.y: A = None
        self.o: B = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: D = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: A = None
        self.y: A = None
        self.o: B = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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