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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: G = None
        self.p: H = None
        self.u: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: F = None
        self.t: A = None
        self.q: F = None
        self.r: A = None
        self.s: E = None
        self.v: B = None
        self.txt = txt

l = A("l")
h = B("h")
e = C("e")
j = D("j")
m = E("m")
a = F("a")
n = G("n")
c = H("c")
f = F("f")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: G = None
        self.p: H = None
        self.u: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: F = None
        self.t: A = None
        self.q: F = None
        self.r: A = None
        self.s: E = None
        self.v: B = None
        self.txt = txt

l = A("l")
h = B("h")
e = C("e")
j = D("j")
m = E("m")
a = F("a")
n = G("n")
c = H("c")
f = F("f")

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