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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: H = None
        self.u: F = None
        self.o: C = None
        self.s: G = None
        self.q: H = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: B = None
        self.u: F = None
        self.z: B = None
        self.s: G = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: E = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: H = None
        self.t: B = None
        self.s: F = None
        self.v: F = None
        self.w: B = None
        self.y: F = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: H = None
        self.u: F = None
        self.o: C = None
        self.s: G = None
        self.q: H = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: B = None
        self.u: F = None
        self.z: B = None
        self.s: G = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: E = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: H = None
        self.t: B = None
        self.s: F = None
        self.v: F = None
        self.w: B = None
        self.y: F = None
        self.q: H = None
        self.txt = txt

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

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