class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: G = None
        self.r: I = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: D = None
        self.o: D = None
        self.u: I = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: H = None
        self.u: E = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: I = None
        self.y: A = None
        self.w: J = None
        self.s: J = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: C = None
        self.s: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: H = None
        self.q: E = None
        self.s: A = None
        self.o: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: D = None
        self.o: D = None
        self.u: I = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: H = None
        self.u: E = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: I = None
        self.y: A = None
        self.w: J = None
        self.s: J = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: C = None
        self.s: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: H = None
        self.q: E = None
        self.s: A = None
        self.o: I = None
        self.txt = txt

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

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