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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: F = None
        self.q: E = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: E = None
        self.y: C = None
        self.txt = txt

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

n.q = k
n.u = e
c.o = k
l.y = f
l.t = f
l.s = k
e.s = c
e.w = f
e.q = k
e.o = l
k.o = c
f.x = k
f.s = k
f.y = l
i.s = c
i.w = f
i.q = k
i.o = l
assert n.u.o.t.y.s.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: F = None
        self.q: E = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: E = None
        self.y: C = None
        self.txt = txt

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

n.q = k
n.u = e
c.o = k
l.y = f
l.t = f
l.s = k
e.s = c
e.w = f
e.q = k
e.o = l
k.o = c
f.x = k
f.s = k
f.y = l
i.s = c
i.w = f
i.q = k
i.o = l
assert n.u.o.t.y.s.o.o.txt == "k"