class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: A = None
        self.z: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: B = None
        self.v: C = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: A = None
        self.x: F = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: B = None
        self.v: C = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: A = None
        self.x: F = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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