class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: B = None
        self.r: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: B = None
        self.x: B = None
        self.o: A = None
        self.u: E = None
        self.w: I = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: B = None
        self.x: B = None
        self.o: A = None
        self.u: E = None
        self.w: I = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

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

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

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

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

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

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