class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: I = None
        self.s: I = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: F = None
        self.z: A = None
        self.w: E = None
        self.v: D = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: I = None
        self.y: H = None
        self.u: B = None
        self.r: J = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: J = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: C = None
        self.p: A = None
        self.y: C = None
        self.v: B = None
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: H = None
        self.q: A = None
        self.w: C = None
        self.o: E = None
        self.p: D = None
        self.r: H = None
        self.y: C = None
        self.t: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: F = None
        self.z: A = None
        self.w: E = None
        self.v: D = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: I = None
        self.y: H = None
        self.u: B = None
        self.r: J = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: J = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: C = None
        self.p: A = None
        self.y: C = None
        self.v: B = None
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: H = None
        self.q: A = None
        self.w: C = None
        self.o: E = None
        self.p: D = None
        self.r: H = None
        self.y: C = None
        self.t: I = None
        self.txt = txt

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

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