class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.p: I = None
        self.w: I = None
        self.q: J = None
        self.t: B = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: E = None
        self.s: A = None
        self.o: D = None
        self.txt = txt

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

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

g.o = l
g.z = m
g.p = d
g.w = d
g.q = k
g.t = a
g.v = b
a.w = m
a.p = m
h.w = n
h.p = n
h.s = g
l.x = h
l.v = m
n.s = e
n.z = d
m.v = d
m.w = e
e.s = d
e.y = d
e.v = h
e.t = h
e.q = n
e.r = b
e.w = b
b.v = e
b.s = e
b.r = e
b.o = n
d.w = g
d.s = g
d.q = n
d.o = l
k.v = l
k.z = a
k.p = g
k.o = e
k.r = d
k.q = b
assert d.o.v.w.v.s.q.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.p: I = None
        self.w: I = None
        self.q: J = None
        self.t: B = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: E = None
        self.s: A = None
        self.o: D = None
        self.txt = txt

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

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

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