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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: H = None
        self.y: B = None
        self.s: B = None
        self.t: A = None
        self.z: A = None
        self.u: B = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: C = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: H = None
        self.y: B = None
        self.s: B = None
        self.t: A = None
        self.z: A = None
        self.u: B = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: C = None
        self.u: B = None
        self.txt = txt

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

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

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

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