class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: G = None
        self.o: I = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: E = None
        self.s: J = None
        self.w: H = None
        self.t: C = None
        self.p: I = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: F = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: E = None
        self.s: J = None
        self.w: H = None
        self.t: C = None
        self.p: I = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: F = None
        self.r: A = None
        self.txt = txt

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

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

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