class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: H = None
        self.u: G = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.z: E = None
        self.t: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: E = None
        self.x: A = None
        self.s: A = None
        self.w: C = None
        self.r: C = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: H = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.z: E = None
        self.t: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: E = None
        self.x: A = None
        self.s: A = None
        self.w: C = None
        self.r: C = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: H = None
        self.z: D = None
        self.txt = txt

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

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