class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: H = None
        self.w: D = None
        self.z: H = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: E = None
        self.z: F = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: D = None
        self.w: A = None
        self.z: G = None
        self.txt = txt

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

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

d = A("d")
l = B("l")
k = C("k")
f = D("f")
b = E("b")
h = F("h")
a = G("a")
i = H("i")
n = C("n")
m = F("m")

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: E = None
        self.z: F = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: D = None
        self.w: A = None
        self.z: G = None
        self.txt = txt

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

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

d = A("d")
l = B("l")
k = C("k")
f = D("f")
b = E("b")
h = F("h")
a = G("a")
i = H("i")
n = C("n")
m = F("m")

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