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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.p: B = None
        self.z: A = None
        self.w: H = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.p: B = None
        self.z: A = None
        self.w: H = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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