class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.w: H = None
        self.r: G = None
        self.x: D = None
        self.p: D = None
        self.z: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: E = None
        self.r: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: E = None
        self.v: D = None
        self.q: D = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: A = None
        self.x: E = None
        self.w: C = None
        self.p: A = None
        self.u: D = None
        self.y: C = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: F = None
        self.p: C = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: E = None
        self.r: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: E = None
        self.v: D = None
        self.q: D = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: A = None
        self.x: E = None
        self.w: C = None
        self.p: A = None
        self.u: D = None
        self.y: C = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: F = None
        self.p: C = None
        self.v: E = None
        self.txt = txt

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

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