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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: E = None
        self.txt = txt

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

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

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

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

k = A("k")
f = B("f")
n = C("n")
j = D("j")
e = E("e")
a = F("a")

k.o = j
k.w = j
k.y = e
k.s = e
k.p = e
k.z = n
f.p = k
f.y = e
n.p = f
n.s = f
n.z = e
n.y = e
j.u = a
j.o = k
e.u = j
e.r = j
e.z = k
e.q = n
e.v = n
a.v = f
a.z = f
a.r = n
assert e.z.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: E = None
        self.w: D = None
        self.s: E = None
        self.z: C = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: E = None
        self.txt = txt

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

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

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

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

k = A("k")
f = B("f")
n = C("n")
j = D("j")
e = E("e")
a = F("a")

k.o = j
k.w = j
k.y = e
k.s = e
k.p = e
k.z = n
f.p = k
f.y = e
n.p = f
n.s = f
n.z = e
n.y = e
j.u = a
j.o = k
e.u = j
e.r = j
e.z = k
e.q = n
e.v = n
a.v = f
a.z = f
a.r = n
assert e.z.s.v.txt == "n"