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

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

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

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

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

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

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

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

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

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

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

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

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

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

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