class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: F = None
        self.y: C = None
        self.p: B = None
        self.x: H = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: G = None
        self.w: C = None
        self.z: F = None
        self.y: F = None
        self.r: G = None
        self.x: F = None
        self.v: H = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.w: G = None
        self.v: C = None
        self.q: E = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: F = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: D = None
        self.s: F = None
        self.z: E = None
        self.r: F = None
        self.v: G = None
        self.o: C = None
        self.x: G = None
        self.w: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: G = None
        self.w: C = None
        self.z: F = None
        self.y: F = None
        self.r: G = None
        self.x: F = None
        self.v: H = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.w: G = None
        self.v: C = None
        self.q: E = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: F = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: D = None
        self.s: F = None
        self.z: E = None
        self.r: F = None
        self.v: G = None
        self.o: C = None
        self.x: G = None
        self.w: I = None
        self.txt = txt

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

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

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