class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.x: I = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: E = None
        self.x: J = None
        self.t: D = None
        self.v: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: A = None
        self.q: H = None
        self.p: E = None
        self.r: A = None
        self.s: D = None
        self.txt = txt

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

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

f.q = k
f.r = g
f.x = h
f.p = c
m.v = f
j.s = b
j.v = b
j.z = a
j.x = l
j.t = k
k.r = l
k.q = c
k.z = f
a.p = l
a.t = k
a.w = m
a.r = m
a.s = j
a.z = h
a.v = c
g.z = l
c.y = j
c.q = j
c.x = k
c.z = k
c.v = k
c.u = h
c.w = b
b.v = g
h.z = b
h.q = b
h.w = f
h.r = f
h.p = a
h.s = k
l.s = j
l.v = c
assert b.v.z.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.x: I = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: E = None
        self.x: J = None
        self.t: D = None
        self.v: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: A = None
        self.q: H = None
        self.p: E = None
        self.r: A = None
        self.s: D = None
        self.txt = txt

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

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

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