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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: E = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: A = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: B = None
        self.t: D = None
        self.z: E = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: H = None
        self.t: D = None
        self.x: H = None
        self.z: H = None
        self.o: A = None
        self.v: H = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: G = None
        self.u: A = None
        self.y: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: E = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: A = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: B = None
        self.t: D = None
        self.z: E = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: H = None
        self.t: D = None
        self.x: H = None
        self.z: H = None
        self.o: A = None
        self.v: H = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: G = None
        self.u: A = None
        self.y: G = None
        self.txt = txt

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

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