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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: H = None
        self.u: B = None
        self.v: G = None
        self.p: E = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: G = None
        self.x: C = None
        self.q: A = None
        self.o: B = None
        self.w: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: H = None
        self.u: B = None
        self.v: G = None
        self.p: E = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: G = None
        self.x: C = None
        self.q: A = None
        self.o: B = None
        self.w: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: F = None
        self.txt = txt

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

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

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