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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: F = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: G = None
        self.q: H = None
        self.o: A = None
        self.t: F = None
        self.u: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: G = None
        self.u: D = None
        self.p: B = None
        self.x: H = None
        self.o: A = None
        self.w: H = None
        self.y: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: F = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: G = None
        self.q: H = None
        self.o: A = None
        self.t: F = None
        self.u: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: G = None
        self.u: D = None
        self.p: B = None
        self.x: H = None
        self.o: A = None
        self.w: H = None
        self.y: A = None
        self.txt = txt

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

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

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