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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: F = None
        self.r: F = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: A = None
        self.s: G = None
        self.v: F = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: D = None
        self.r: E = None
        self.z: E = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: B = None
        self.v: C = None
        self.p: A = None
        self.r: B = None
        self.y: A = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: F = None
        self.r: F = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: A = None
        self.s: G = None
        self.v: F = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: D = None
        self.r: E = None
        self.z: E = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: B = None
        self.v: C = None
        self.p: A = None
        self.r: B = None
        self.y: A = None
        self.s: D = None
        self.txt = txt

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

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