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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: E = None
        self.s: G = None
        self.p: G = None
        self.z: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: C = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: D = None
        self.z: D = None
        self.r: F = None
        self.y: A = None
        self.o: D = None
        self.x: G = None
        self.txt = txt

h = A("h")
d = B("d")
a = C("a")
m = D("m")
f = E("f")
g = F("g")
k = G("k")
l = H("l")
i = I("i")
j = E("j")

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: E = None
        self.s: G = None
        self.p: G = None
        self.z: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: C = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: D = None
        self.z: D = None
        self.r: F = None
        self.y: A = None
        self.o: D = None
        self.x: G = None
        self.txt = txt

h = A("h")
d = B("d")
a = C("a")
m = D("m")
f = E("f")
g = F("g")
k = G("k")
l = H("l")
i = I("i")
j = E("j")

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