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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: E = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: A = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: E = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: A = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: C = None
        self.txt = txt

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

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

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

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