class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: C = None
        self.p: D = None
        self.t: F = None
        self.y: D = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: C = None
        self.y: A = None
        self.r: C = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: C = None
        self.y: A = None
        self.r: C = None
        self.q: E = None
        self.txt = txt

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

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

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

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

h.w = c
h.y = c
h.r = m
h.p = i
h.v = i
h.t = n
k.w = d
k.v = d
f.t = c
f.u = m
f.r = m
f.y = h
f.q = l
c.w = l
c.t = h
c.y = h
c.v = f
l.o = i
l.z = i
n.u = k
i.w = l
i.t = h
i.y = h
i.v = f
d.w = a
d.v = a
a.w = d
a.v = k
m.t = i
m.u = f
m.r = f
m.y = h
m.q = l
assert h.t.u.v.w.v.w.w.v.txt == "k"