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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.r: E = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

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

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

a = A("a")
n = B("n")
b = C("b")
l = D("l")
k = E("k")
c = F("c")
e = G("e")
h = H("h")
i = B("i")

a.r = n
a.y = k
a.w = e
a.x = b
n.p = e
n.z = e
n.v = k
n.u = a
n.r = c
n.w = h
n.s = l
n.q = b
b.s = c
b.x = c
b.v = l
b.u = k
b.r = k
b.q = e
l.q = k
l.w = k
l.r = k
l.p = a
k.w = l
k.y = e
k.t = h
k.v = b
k.s = n
c.o = l
c.u = l
c.p = i
e.x = l
h.y = a
h.u = n
h.w = n
h.x = k
h.q = c
h.r = e
h.p = e
h.o = l
i.p = e
i.z = e
i.v = k
i.u = a
i.r = c
i.w = h
i.s = l
i.q = b
assert c.u.p.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: E = None
        self.w: G = None
        self.x: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.r: E = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

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

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

a = A("a")
n = B("n")
b = C("b")
l = D("l")
k = E("k")
c = F("c")
e = G("e")
h = H("h")
i = B("i")

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