class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: A = None
        self.p: B = None
        self.r: A = None
        self.w: C = None
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: D = None
        self.s: A = None
        self.w: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: F = None
        self.x: F = None
        self.s: A = None
        self.v: B = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: D = None
        self.s: A = None
        self.w: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: F = None
        self.x: F = None
        self.s: A = None
        self.v: B = None
        self.o: C = None
        self.txt = txt

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

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

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