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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: F = None
        self.y: E = None
        self.t: B = None
        self.r: G = None
        self.s: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: F = None
        self.y: E = None
        self.t: B = None
        self.r: G = None
        self.s: G = None
        self.txt = txt

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

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