class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: A = None
        self.r: E = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: A = None
        self.r: E = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

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