class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: C = None
        self.p: C = None
        self.o: H = None
        self.t: H = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: C = None
        self.q: G = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: H = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: F = None
        self.y: D = None
        self.w: F = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: D = None
        self.z: J = None
        self.p: I = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: C = None
        self.q: G = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: H = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: F = None
        self.y: D = None
        self.w: F = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: D = None
        self.z: J = None
        self.p: I = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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