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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: C = None
        self.z: D = None
        self.u: C = None
        self.o: B = None
        self.txt = txt

k = A("k")
l = B("l")
i = C("i")
f = D("f")
a = E("a")
d = F("d")
g = D("g")
b = C("b")
j = B("j")
e = B("e")

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: C = None
        self.z: D = None
        self.u: C = None
        self.o: B = None
        self.txt = txt

k = A("k")
l = B("l")
i = C("i")
f = D("f")
a = E("a")
d = F("d")
g = D("g")
b = C("b")
j = B("j")
e = B("e")

k.w = d
k.s = d
k.o = f
l.o = k
l.v = a
l.y = a
l.x = b
l.q = f
i.s = k
i.y = j
i.r = d
i.z = d
f.q = d
f.u = k
a.q = d
a.s = g
d.w = k
d.s = i
d.u = i
d.z = g
d.o = l
g.q = d
g.u = k
b.s = k
b.y = j
b.r = d
b.z = d
j.o = k
j.v = a
j.y = a
j.x = i
j.q = g
e.o = k
e.v = a
e.y = a
e.x = i
e.q = g
assert d.u.y.q.q.w.o.u.s.txt == "d"