class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: F = None
        self.q: C = None
        self.w: D = None
        self.t: F = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

c.y = i
c.v = i
c.t = i
c.q = n
c.o = n
c.w = e
h.t = n
h.r = n
h.z = e
n.w = e
n.r = c
n.t = c
n.u = h
n.z = k
n.y = k
e.t = k
e.z = k
e.w = n
k.v = i
i.u = n
assert e.w.u.r.u.t.txt == "n"