class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: B = None
        self.o: J = None
        self.x: A = None
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: E = None
        self.t: F = None
        self.r: E = None
        self.p: I = None
        self.s: B = None
        self.y: C = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: B = None
        self.o: J = None
        self.x: A = None
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: E = None
        self.t: F = None
        self.r: E = None
        self.p: I = None
        self.s: B = None
        self.y: C = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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