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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.w: D = None
        self.z: F = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: A = None
        self.s: D = None
        self.t: F = None
        self.u: F = None
        self.x: C = None
        self.txt = txt

k = A("k")
j = B("j")
h = C("h")
d = D("d")
g = E("g")
a = F("a")
c = F("c")
l = D("l")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.w: D = None
        self.z: F = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: A = None
        self.s: D = None
        self.t: F = None
        self.u: F = None
        self.x: C = None
        self.txt = txt

k = A("k")
j = B("j")
h = C("h")
d = D("d")
g = E("g")
a = F("a")
c = F("c")
l = D("l")

k.w = a
j.q = d
j.y = g
j.r = c
h.v = a
h.s = d
h.z = c
h.r = k
d.p = c
d.v = k
d.r = k
d.x = j
d.o = g
g.o = l
g.w = l
g.v = c
g.z = a
g.s = d
a.v = k
a.r = k
a.s = l
a.t = c
a.u = c
a.x = h
c.v = k
c.r = k
c.s = d
c.t = a
c.u = a
c.x = h
l.p = a
l.v = k
l.r = k
l.x = j
l.o = g
assert k.w.s.v.w.txt == "a"