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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: J = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: F = None
        self.s: F = None
        self.u: C = None
        self.t: I = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: C = None
        self.x: H = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.p: D = None
        self.r: E = None
        self.o: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: F = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: E = None
        self.w: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: J = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: F = None
        self.s: F = None
        self.u: C = None
        self.t: I = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: C = None
        self.x: H = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.p: D = None
        self.r: E = None
        self.o: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: F = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: E = None
        self.w: B = None
        self.txt = txt

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

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