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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: E = None
        self.x: C = None
        self.q: C = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: E = None
        self.x: C = None
        self.q: C = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

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

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

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