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

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: F = None
        self.w: D = None
        self.p: C = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: F = None
        self.u: D = None
        self.z: E = None
        self.v: H = None
        self.o: I = None
        self.p: E = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: D = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: E = None
        self.q: A = None
        self.y: F = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: F = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: F = None
        self.w: D = None
        self.p: C = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: F = None
        self.u: D = None
        self.z: E = None
        self.v: H = None
        self.o: I = None
        self.p: E = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: D = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: E = None
        self.q: A = None
        self.y: F = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: F = None
        self.y: B = None
        self.txt = txt

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

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