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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: C = None
        self.u: C = None
        self.w: I = None
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: B = None
        self.x: F = None
        self.r: A = None
        self.t: B = None
        self.w: F = None
        self.o: E = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: B = 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.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: I = None
        self.r: C = None
        self.u: B = None
        self.w: D = None
        self.p: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: I = None
        self.r: C = None
        self.q: D = None
        self.txt = txt

g = A("g")
n = B("n")
k = C("k")
e = D("e")
m = E("m")
i = F("i")
f = G("f")
b = H("b")
j = I("j")
l = J("l")

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: C = None
        self.u: C = None
        self.w: I = None
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: B = None
        self.x: F = None
        self.r: A = None
        self.t: B = None
        self.w: F = None
        self.o: E = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: B = 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.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: I = None
        self.r: C = None
        self.u: B = None
        self.w: D = None
        self.p: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: I = None
        self.r: C = None
        self.q: D = None
        self.txt = txt

g = A("g")
n = B("n")
k = C("k")
e = D("e")
m = E("m")
i = F("i")
f = G("f")
b = H("b")
j = I("j")
l = J("l")

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