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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: F = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.w: D = None
        self.s: B = None
        self.x: D = None
        self.r: F = None
        self.txt = txt

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

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

i.v = m
i.z = m
i.w = k
n.r = i
f.o = m
f.u = m
f.s = c
d.w = n
d.r = i
c.z = f
c.q = m
c.r = m
c.w = d
c.x = d
c.s = n
m.t = b
m.u = n
h.v = m
h.z = m
h.w = k
k.w = n
k.r = h
b.w = n
b.r = i
j.z = f
j.q = m
j.r = m
j.w = k
j.x = k
j.s = n
assert m.t.w.r.z.t.w.r.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: D = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: F = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.w: D = None
        self.s: B = None
        self.x: D = None
        self.r: F = None
        self.txt = txt

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

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

i.v = m
i.z = m
i.w = k
n.r = i
f.o = m
f.u = m
f.s = c
d.w = n
d.r = i
c.z = f
c.q = m
c.r = m
c.w = d
c.x = d
c.s = n
m.t = b
m.u = n
h.v = m
h.z = m
h.w = k
k.w = n
k.r = h
b.w = n
b.r = i
j.z = f
j.q = m
j.r = m
j.w = k
j.x = k
j.s = n
assert m.t.w.r.z.t.w.r.w.w.txt == "n"