class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: D = None
        self.s: I = None
        self.t: H = None
        self.x: I = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: B = None
        self.s: H = None
        self.r: B = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: E = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: D = None
        self.p: J = None
        self.q: H = None
        self.y: C = None
        self.z: I = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: A = None
        self.w: D = None
        self.r: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: I = None
        self.q: C = None
        self.v: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: C = None
        self.t: F = None
        self.x: D = None
        self.v: H = None
        self.p: C = None
        self.y: A = None
        self.w: H = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: B = None
        self.s: H = None
        self.r: B = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: E = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: D = None
        self.p: J = None
        self.q: H = None
        self.y: C = None
        self.z: I = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: A = None
        self.w: D = None
        self.r: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: I = None
        self.q: C = None
        self.v: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: C = None
        self.t: F = None
        self.x: D = None
        self.v: H = None
        self.p: C = None
        self.y: A = None
        self.w: H = None
        self.q: E = None
        self.txt = txt

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

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