class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

l = A("l")
b = B("b")
c = C("c")
e = D("e")
k = E("k")
f = F("f")
h = C("h")
j = D("j")

l.v = f
l.t = f
b.w = f
c.s = h
c.t = f
c.r = f
c.z = l
e.x = b
e.v = k
e.r = f
k.x = c
k.y = j
k.u = b
f.y = e
f.o = e
f.r = j
f.w = j
f.z = l
f.q = h
h.s = c
h.t = f
h.r = f
h.z = l
j.x = b
j.v = k
j.r = f
assert l.t.y.v.x.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

l = A("l")
b = B("b")
c = C("c")
e = D("e")
k = E("k")
f = F("f")
h = C("h")
j = D("j")

l.v = f
l.t = f
b.w = f
c.s = h
c.t = f
c.r = f
c.z = l
e.x = b
e.v = k
e.r = f
k.x = c
k.y = j
k.u = b
f.y = e
f.o = e
f.r = j
f.w = j
f.z = l
f.q = h
h.s = c
h.t = f
h.r = f
h.z = l
j.x = b
j.v = k
j.r = f
assert l.t.y.v.x.s.z.txt == "l"