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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: H = None
        self.s: F = None
        self.w: E = None
        self.q: G = None
        self.r: G = None
        self.u: H = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: C = None
        self.t: A = None
        self.w: G = None
        self.z: G = None
        self.y: B = None
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: E = None
        self.w: F = None
        self.y: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: H = None
        self.s: F = None
        self.w: E = None
        self.q: G = None
        self.r: G = None
        self.u: H = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: C = None
        self.t: A = None
        self.w: G = None
        self.z: G = None
        self.y: B = None
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: E = None
        self.w: F = None
        self.y: G = None
        self.txt = txt

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

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