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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: H = None
        self.y: C = None
        self.t: A = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: E = None
        self.q: F = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: H = None
        self.y: C = None
        self.t: A = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: E = None
        self.q: F = None
        self.w: D = None
        self.txt = txt

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

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