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

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: E = None
        self.t: D = None
        self.w: A = None
        self.o: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: E = None
        self.t: D = None
        self.w: A = None
        self.o: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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