class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.p: F = None
        self.z: F = None
        self.r: H = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: H = None
        self.r: C = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: F = None
        self.r: A = None
        self.w: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: G = None
        self.x: D = None
        self.u: H = None
        self.z: B = None
        self.q: D = None
        self.v: D = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: H = None
        self.r: C = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: F = None
        self.r: A = None
        self.w: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: G = None
        self.x: D = None
        self.u: H = None
        self.z: B = None
        self.q: D = None
        self.v: D = None
        self.y: A = None
        self.txt = txt

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

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

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

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