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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.o: G = None
        self.s: G = None
        self.t: C = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: C = None
        self.y: B = None
        self.r: C = None
        self.x: A = None
        self.z: H = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: E = None
        self.y: G = None
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: A = None
        self.p: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.o: G = None
        self.s: G = None
        self.t: C = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: C = None
        self.y: B = None
        self.r: C = None
        self.x: A = None
        self.z: H = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: E = None
        self.y: G = None
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: A = None
        self.p: F = None
        self.txt = txt

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

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

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