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

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

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

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

e = A("e")
g = B("g")
c = C("c")
l = D("l")
j = E("j")
f = F("f")

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

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

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

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

e = A("e")
g = B("g")
c = C("c")
l = D("l")
j = E("j")
f = F("f")

e.v = l
e.p = j
e.z = f
e.y = f
e.x = f
e.o = f
g.u = j
c.p = j
c.w = f
c.z = f
c.o = f
c.v = g
l.x = g
l.q = g
l.w = j
l.y = f
l.u = c
j.v = l
f.s = c
assert j.v.x.u.v.w.v.txt == "l"