class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: E = None
        self.y: G = None
        self.q: D = None
        self.x: G = None
        self.u: G = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: F = None
        self.o: G = None
        self.x: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: A = None
        self.u: F = None
        self.q: F = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

j = A("j")
e = B("e")
f = C("f")
a = D("a")
i = E("i")
d = F("d")
g = G("g")
m = H("m")

j.z = a
j.q = a
j.p = i
j.y = g
j.x = g
j.u = g
j.t = d
e.w = g
e.z = j
f.q = j
f.w = d
f.o = g
f.x = m
a.v = f
a.w = m
a.z = m
a.x = e
a.s = e
a.t = g
a.y = j
i.q = e
i.u = d
d.z = i
g.v = d
g.u = d
g.q = d
g.w = j
g.s = f
m.y = f
assert d.z.q.w.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: E = None
        self.y: G = None
        self.q: D = None
        self.x: G = None
        self.u: G = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: F = None
        self.o: G = None
        self.x: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: A = None
        self.u: F = None
        self.q: F = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

j = A("j")
e = B("e")
f = C("f")
a = D("a")
i = E("i")
d = F("d")
g = G("g")
m = H("m")

j.z = a
j.q = a
j.p = i
j.y = g
j.x = g
j.u = g
j.t = d
e.w = g
e.z = j
f.q = j
f.w = d
f.o = g
f.x = m
a.v = f
a.w = m
a.z = m
a.x = e
a.s = e
a.t = g
a.y = j
i.q = e
i.u = d
d.z = i
g.v = d
g.u = d
g.q = d
g.w = j
g.s = f
m.y = f
assert d.z.q.w.w.y.txt == "g"