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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: H = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: F = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: H = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: F = None
        self.t: C = None
        self.txt = txt

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

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

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