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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: I = None
        self.v: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.w: H = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: I = None
        self.v: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.w: H = None
        self.t: D = None
        self.txt = txt

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

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

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