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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: B = None
        self.y: F = None
        self.o: B = None
        self.v: A = None
        self.w: A = None
        self.x: F = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.u: C = None
        self.v: C = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: B = None
        self.y: F = None
        self.o: B = None
        self.v: A = None
        self.w: A = None
        self.x: F = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.u: C = None
        self.v: C = None
        self.o: A = None
        self.txt = txt

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

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

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

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