class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: H = None
        self.y: C = None
        self.o: J = None
        self.t: G = None
        self.r: B = None
        self.w: C = None
        self.v: H = None
        self.s: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: E = None
        self.p: D = None
        self.o: F = None
        self.q: B = None
        self.v: F = None
        self.y: E = None
        self.w: J = None
        self.z: B = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: E = None
        self.w: F = None
        self.o: J = None
        self.y: C = None
        self.s: C = None
        self.x: G = None
        self.z: E = None
        self.v: B = None
        self.t: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: J = None
        self.p: C = None
        self.q: B = None
        self.r: C = None
        self.w: F = None
        self.x: H = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: C = None
        self.y: E = None
        self.x: I = None
        self.t: D = None
        self.q: F = None
        self.txt = txt

c = A("c")
e = B("e")
h = C("h")
b = D("b")
l = E("l")
f = F("f")
d = G("d")
i = H("i")
k = I("k")
g = J("g")

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: E = None
        self.p: D = None
        self.o: F = None
        self.q: B = None
        self.v: F = None
        self.y: E = None
        self.w: J = None
        self.z: B = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: E = None
        self.w: F = None
        self.o: J = None
        self.y: C = None
        self.s: C = None
        self.x: G = None
        self.z: E = None
        self.v: B = None
        self.t: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: J = None
        self.p: C = None
        self.q: B = None
        self.r: C = None
        self.w: F = None
        self.x: H = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: C = None
        self.y: E = None
        self.x: I = None
        self.t: D = None
        self.q: F = None
        self.txt = txt

c = A("c")
e = B("e")
h = C("h")
b = D("b")
l = E("l")
f = F("f")
d = G("d")
i = H("i")
k = I("k")
g = J("g")

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