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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: E = None
        self.r: D = None
        self.z: H = None
        self.q: H = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: F = None
        self.v: B = None
        self.r: G = None
        self.z: G = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: E = None
        self.r: D = None
        self.z: H = None
        self.q: H = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: F = None
        self.v: B = None
        self.r: G = None
        self.z: G = None
        self.p: C = None
        self.txt = txt

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

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