class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: G = None
        self.y: I = None
        self.o: C = None
        self.x: B = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: D = None
        self.o: J = None
        self.x: D = None
        self.v: A = None
        self.y: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: J = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: A = None
        self.q: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: D = None
        self.o: J = None
        self.x: D = None
        self.v: A = None
        self.y: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: J = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: A = None
        self.q: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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