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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: D = None
        self.u: A = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: A = None
        self.s: B = None
        self.t: D = None
        self.z: D = None
        self.txt = txt

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

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

k = A("k")
n = B("n")
f = C("f")
c = D("c")
a = E("a")
i = F("i")
e = D("e")
h = E("h")
l = E("l")

k.z = c
k.w = f
n.v = e
n.w = e
n.u = k
n.y = l
f.r = i
c.v = e
c.t = e
c.z = e
c.u = k
c.s = n
a.v = k
a.u = c
i.s = n
e.v = c
e.t = c
e.z = c
e.u = k
e.s = n
h.v = k
h.u = e
l.v = k
l.u = c
assert h.u.s.y.v.w.r.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: D = None
        self.u: A = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: A = None
        self.s: B = None
        self.t: D = None
        self.z: D = None
        self.txt = txt

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

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

k = A("k")
n = B("n")
f = C("f")
c = D("c")
a = E("a")
i = F("i")
e = D("e")
h = E("h")
l = E("l")

k.z = c
k.w = f
n.v = e
n.w = e
n.u = k
n.y = l
f.r = i
c.v = e
c.t = e
c.z = e
c.u = k
c.s = n
a.v = k
a.u = c
i.s = n
e.v = c
e.t = c
e.z = c
e.u = k
e.s = n
h.v = k
h.u = e
l.v = k
l.u = c
assert h.u.s.y.v.w.r.s.v.txt == "e"