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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: G = None
        self.w: E = None
        self.v: E = None
        self.y: G = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: D = None
        self.u: C = None
        self.r: B = None
        self.v: B = None
        self.q: H = None
        self.x: F = None
        self.txt = txt

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

d = A("d")
c = B("c")
h = C("h")
b = D("b")
m = E("m")
a = F("a")
e = G("e")
k = H("k")
g = C("g")

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: G = None
        self.w: E = None
        self.v: E = None
        self.y: G = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: D = None
        self.u: C = None
        self.r: B = None
        self.v: B = None
        self.q: H = None
        self.x: F = None
        self.txt = txt

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

d = A("d")
c = B("c")
h = C("h")
b = D("b")
m = E("m")
a = F("a")
e = G("e")
k = H("k")
g = C("g")

d.r = c
d.w = c
d.x = m
d.z = a
d.o = b
c.p = a
c.w = m
c.z = h
h.u = g
h.r = g
h.p = a
h.z = k
h.v = e
b.o = d
b.q = e
b.y = e
b.x = e
b.w = m
b.v = m
m.o = h
m.s = k
a.v = e
e.w = k
e.q = k
e.y = b
e.u = h
e.r = c
e.v = c
e.x = a
k.r = d
k.z = m
k.q = c
k.x = e
g.u = h
g.r = h
g.p = a
g.z = k
g.v = e
assert c.z.v.v.txt == "c"