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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: F = None
        self.z: C = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: E = None
        self.x: G = None
        self.y: B = None
        self.t: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: F = None
        self.z: C = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: E = None
        self.x: G = None
        self.y: B = None
        self.t: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: D = None
        self.txt = txt

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

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