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

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: C = None
        self.x: E = None
        self.t: A = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: D = None
        self.q: C = None
        self.y: E = None
        self.s: B = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.p: C = None
        self.o: H = None
        self.r: A = None
        self.t: A = None
        self.s: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: F = None
        self.q: G = None
        self.p: E = None
        self.w: E = None
        self.r: G = None
        self.t: E = None
        self.z: A = None
        self.txt = txt

l = A("l")
g = B("g")
n = C("n")
e = D("e")
c = E("c")
j = F("j")
d = G("d")
a = H("a")
b = H("b")
i = C("i")

l.v = b
l.u = a
g.u = c
g.o = c
g.x = c
g.r = c
g.t = d
g.q = j
n.t = i
n.z = d
n.o = g
e.r = b
e.z = i
e.x = c
e.t = l
e.p = g
c.r = e
c.y = e
j.w = d
j.o = e
j.r = e
j.q = n
j.y = c
j.s = g
d.q = l
d.r = l
d.t = l
d.z = a
d.p = n
d.o = b
d.s = j
d.w = c
a.u = c
a.p = c
a.w = c
a.t = c
a.s = j
a.q = d
a.r = d
a.z = l
b.u = c
b.p = c
b.w = c
b.t = c
b.s = j
b.q = d
b.r = d
b.z = l
i.t = n
i.z = d
i.o = g
assert a.z.v.q.z.z.u.z.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: C = None
        self.x: E = None
        self.t: A = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: D = None
        self.q: C = None
        self.y: E = None
        self.s: B = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.p: C = None
        self.o: H = None
        self.r: A = None
        self.t: A = None
        self.s: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: F = None
        self.q: G = None
        self.p: E = None
        self.w: E = None
        self.r: G = None
        self.t: E = None
        self.z: A = None
        self.txt = txt

l = A("l")
g = B("g")
n = C("n")
e = D("e")
c = E("c")
j = F("j")
d = G("d")
a = H("a")
b = H("b")
i = C("i")

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