class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: B = None
        self.u: E = None
        self.x: E = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: C = None
        self.z: H = None
        self.v: H = None
        self.t: H = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: C = None
        self.s: C = None
        self.r: F = None
        self.z: D = None
        self.u: G = None
        self.v: B = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: E = None
        self.w: A = None
        self.s: A = None
        self.u: E = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: A = None
        self.y: A = None
        self.o: B = None
        self.r: C = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: C = None
        self.z: H = None
        self.v: H = None
        self.t: H = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: C = None
        self.s: C = None
        self.r: F = None
        self.z: D = None
        self.u: G = None
        self.v: B = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: E = None
        self.w: A = None
        self.s: A = None
        self.u: E = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: A = None
        self.y: A = None
        self.o: B = None
        self.r: C = None
        self.t: F = None
        self.txt = txt

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

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