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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: C = None
        self.z: F = None
        self.y: B = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: A = None
        self.x: F = None
        self.y: C = None
        self.txt = txt

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

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

a.v = b
a.o = b
a.s = c
a.w = i
m.r = b
m.q = b
m.o = i
m.u = e
m.s = c
m.z = f
b.r = m
b.s = f
b.y = f
f.w = e
f.z = e
f.u = b
f.y = m
f.q = m
i.v = f
i.o = c
i.x = e
i.y = b
e.r = f
c.v = b
c.o = b
c.s = a
c.w = i
assert a.v.y.u.r.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: A = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: C = None
        self.z: F = None
        self.y: B = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: A = None
        self.x: F = None
        self.y: C = None
        self.txt = txt

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

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

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