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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: C = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

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

a.v = i
a.w = l
c.z = e
c.p = e
c.s = i
c.w = n
l.q = i
l.p = n
i.q = e
e.u = b
e.r = l
e.s = a
e.y = c
b.p = n
b.u = l
b.o = c
b.r = c
n.u = b
n.r = l
n.s = a
n.y = c
assert e.u.r.s.q.y.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: C = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

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

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