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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: G = None
        self.z: I = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: D = None
        self.p: I = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: G = None
        self.v: B = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: B = None
        self.r: E = None
        self.v: C = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: G = None
        self.z: I = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: D = None
        self.p: I = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: G = None
        self.v: B = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: B = None
        self.r: E = None
        self.v: C = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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