class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: C = None
        self.w: B = None
        self.v: E = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: F = None
        self.p: A = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: H = None
        self.t: H = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: I = None
        self.o: D = None
        self.q: J = None
        self.u: A = None
        self.s: G = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: D = None
        self.v: F = None
        self.q: G = None
        self.y: E = None
        self.u: G = None
        self.s: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: I = None
        self.u: I = None
        self.t: E = None
        self.x: D = None
        self.r: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: F = None
        self.p: A = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: H = None
        self.t: H = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: I = None
        self.o: D = None
        self.q: J = None
        self.u: A = None
        self.s: G = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: D = None
        self.v: F = None
        self.q: G = None
        self.y: E = None
        self.u: G = None
        self.s: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: I = None
        self.u: I = None
        self.t: E = None
        self.x: D = None
        self.r: B = None
        self.txt = txt

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

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