class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: F = None
        self.v: F = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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