class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: F = None
        self.o: D = None
        self.q: C = 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.u: D = None
        self.q: B = None
        self.w: D = None
        self.x: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

i.v = f
i.q = f
i.x = a
i.o = c
n.u = b
e.u = c
e.w = c
e.q = n
e.x = f
c.y = f
k.z = a
a.s = e
a.y = b
a.p = c
b.z = a
f.u = c
f.w = c
f.q = n
f.x = e
assert e.q.u.z.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: F = None
        self.o: D = None
        self.q: C = 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.u: D = None
        self.q: B = None
        self.w: D = None
        self.x: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

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