class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.t: I = None
        self.x: B = None
        self.q: F = None
        self.p: I = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: D = None
        self.p: J = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: I = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: D = None
        self.p: J = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: I = None
        self.z: A = None
        self.txt = txt

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

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