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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: C = None
        self.w: D = None
        self.z: G = None
        self.t: G = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: C = None
        self.w: D = None
        self.z: G = None
        self.t: G = None
        self.v: D = None
        self.txt = txt

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

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