class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: A = None
        self.v: F = None
        self.z: A = None
        self.q: H = None
        self.t: D = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: C = None
        self.x: C = None
        self.p: F = None
        self.t: C = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: H = None
        self.s: D = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: C = None
        self.x: C = None
        self.p: F = None
        self.t: C = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: H = None
        self.s: D = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

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

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