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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: A = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: C = None
        self.z: C = None
        self.s: D = None
        self.x: G = None
        self.p: G = None
        self.u: C = None
        self.v: G = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: B = None
        self.q: D = None
        self.r: E = None
        self.p: D = None
        self.t: B = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: H = None
        self.p: H = None
        self.s: B = None
        self.o: D = None
        self.u: G = None
        self.x: H = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.p: E = None
        self.v: C = None
        self.r: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: A = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: C = None
        self.z: C = None
        self.s: D = None
        self.x: G = None
        self.p: G = None
        self.u: C = None
        self.v: G = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: B = None
        self.q: D = None
        self.r: E = None
        self.p: D = None
        self.t: B = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: H = None
        self.p: H = None
        self.s: B = None
        self.o: D = None
        self.u: G = None
        self.x: H = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.p: E = None
        self.v: C = None
        self.r: H = None
        self.txt = txt

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

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