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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: G = None
        self.w: H = None
        self.t: F = None
        self.p: A = None
        self.o: F = None
        self.z: E = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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

m = A("m")
i = B("i")
a = C("a")
k = D("k")
j = E("j")
b = F("b")
l = G("l")
e = H("e")

m.u = a
i.q = j
i.o = e
i.x = b
i.v = b
i.y = a
i.p = a
i.z = l
a.v = m
a.p = m
a.q = l
a.w = e
a.t = b
a.o = b
a.z = j
a.u = i
k.x = m
j.y = a
j.t = k
j.w = i
b.u = l
b.w = l
l.v = j
l.y = j
l.r = k
l.x = i
l.s = e
l.z = a
e.v = i
e.s = b
e.u = b
e.x = a
assert j.y.u.o.x.o.w.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: G = None
        self.w: H = None
        self.t: F = None
        self.p: A = None
        self.o: F = None
        self.z: E = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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

m = A("m")
i = B("i")
a = C("a")
k = D("k")
j = E("j")
b = F("b")
l = G("l")
e = H("e")

m.u = a
i.q = j
i.o = e
i.x = b
i.v = b
i.y = a
i.p = a
i.z = l
a.v = m
a.p = m
a.q = l
a.w = e
a.t = b
a.o = b
a.z = j
a.u = i
k.x = m
j.y = a
j.t = k
j.w = i
b.u = l
b.w = l
l.v = j
l.y = j
l.r = k
l.x = i
l.s = e
l.z = a
e.v = i
e.s = b
e.u = b
e.x = a
assert j.y.u.o.x.o.w.txt == "l"