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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: F = None
        self.r: F = None
        self.p: D = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

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

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

n = A("n")
b = B("b")
l = C("l")
e = D("e")
i = E("i")
h = F("h")
d = D("d")
m = B("m")
f = D("f")

n.z = i
n.v = b
b.r = e
b.u = n
b.y = h
l.o = h
l.u = i
l.v = b
l.s = n
e.o = i
e.v = h
e.r = h
e.p = d
e.t = b
e.y = b
i.u = h
i.z = h
h.r = n
h.z = e
d.o = i
d.v = h
d.r = h
d.p = e
d.t = b
d.y = b
m.r = f
m.u = n
m.y = h
f.o = i
f.v = h
f.r = h
f.p = e
f.t = b
f.y = m
assert m.r.r.r.z.u.r.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: F = None
        self.r: F = None
        self.p: D = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

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

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

n = A("n")
b = B("b")
l = C("l")
e = D("e")
i = E("i")
h = F("h")
d = D("d")
m = B("m")
f = D("f")

n.z = i
n.v = b
b.r = e
b.u = n
b.y = h
l.o = h
l.u = i
l.v = b
l.s = n
e.o = i
e.v = h
e.r = h
e.p = d
e.t = b
e.y = b
i.u = h
i.z = h
h.r = n
h.z = e
d.o = i
d.v = h
d.r = h
d.p = e
d.t = b
d.y = b
m.r = f
m.u = n
m.y = h
f.o = i
f.v = h
f.r = h
f.p = e
f.t = b
f.y = m
assert m.r.r.r.z.u.r.v.y.txt == "h"