class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: H = None
        self.u: A = None
        self.q: F = None
        self.z: D = None
        self.v: E = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: D = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: H = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: C = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: H = None
        self.u: A = None
        self.q: F = None
        self.z: D = None
        self.v: E = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: D = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: H = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: C = None
        self.r: A = None
        self.txt = txt

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

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