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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: B = None
        self.q: E = None
        self.t: F = None
        self.v: E = None
        self.txt = txt

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

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

a.z = k
a.w = k
a.s = k
d.u = e
d.p = e
d.x = l
d.t = l
d.w = k
e.v = d
k.w = a
l.s = a
l.z = d
l.q = i
l.v = i
l.t = g
h.z = a
h.x = a
h.t = g
h.q = g
i.s = a
i.z = d
i.q = l
i.v = l
i.t = h
g.z = a
g.x = a
g.t = h
g.q = h
assert h.z.w.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: D = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: B = None
        self.q: E = None
        self.t: F = None
        self.v: E = None
        self.txt = txt

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

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

a.z = k
a.w = k
a.s = k
d.u = e
d.p = e
d.x = l
d.t = l
d.w = k
e.v = d
k.w = a
l.s = a
l.z = d
l.q = i
l.v = i
l.t = g
h.z = a
h.x = a
h.t = g
h.q = g
i.s = a
i.z = d
i.q = l
i.v = l
i.t = h
g.z = a
g.x = a
g.t = h
g.q = h
assert h.z.w.w.w.txt == "k"