class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: E = None
        self.u: E = None
        self.w: E = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.q: D = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: A = None
        self.o: E = None
        self.p: A = None
        self.t: F = None
        self.txt = txt

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

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

c = A("c")
l = B("l")
b = C("b")
a = D("a")
e = E("e")
d = F("d")

c.v = l
c.y = e
c.u = e
c.w = e
c.q = d
l.q = b
l.w = b
b.p = c
b.y = c
b.v = a
b.q = a
b.t = e
a.v = c
a.q = c
a.p = c
a.o = e
a.t = d
e.s = l
e.p = d
d.s = e
assert c.w.p.s.p.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: E = None
        self.u: E = None
        self.w: E = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.q: D = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: A = None
        self.o: E = None
        self.p: A = None
        self.t: F = None
        self.txt = txt

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

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

c = A("c")
l = B("l")
b = C("b")
a = D("a")
e = E("e")
d = F("d")

c.v = l
c.y = e
c.u = e
c.w = e
c.q = d
l.q = b
l.w = b
b.p = c
b.y = c
b.v = a
b.q = a
b.t = e
a.v = c
a.q = c
a.p = c
a.o = e
a.t = d
e.s = l
e.p = d
d.s = e
assert c.w.p.s.p.s.txt == "e"