class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: D = None
        self.t: F = None
        self.s: E = None
        self.x: D = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: F = None
        self.z: H = None
        self.w: F = None
        self.x: J = None
        self.o: H = None
        self.p: J = None
        self.u: F = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: H = None
        self.o: F = None
        self.p: J = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: H = None
        self.p: B = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: G = None
        self.y: B = None
        self.z: G = None
        self.p: C = None
        self.x: J = None
        self.o: E = None
        self.s: A = None
        self.r: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: B = None
        self.t: F = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: F = None
        self.z: H = None
        self.w: F = None
        self.x: J = None
        self.o: H = None
        self.p: J = None
        self.u: F = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: H = None
        self.o: F = None
        self.p: J = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: H = None
        self.p: B = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: G = None
        self.y: B = None
        self.z: G = None
        self.p: C = None
        self.x: J = None
        self.o: E = None
        self.s: A = None
        self.r: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: B = None
        self.t: F = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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