class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: H = None
        self.q: I = None
        self.z: B = None
        self.u: E = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.o: E = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: D = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: F = None
        self.y: B = None
        self.o: G = None
        self.p: G = None
        self.s: C = None
        self.t: J = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: H = None
        self.r: I = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: I = None
        self.z: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: D = None
        self.q: F = None
        self.p: F = None
        self.z: E = None
        self.r: D = None
        self.y: B = None
        self.t: D = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.o: E = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: D = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: F = None
        self.y: B = None
        self.o: G = None
        self.p: G = None
        self.s: C = None
        self.t: J = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: H = None
        self.r: I = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: I = None
        self.z: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: D = None
        self.q: F = None
        self.p: F = None
        self.z: E = None
        self.r: D = None
        self.y: B = None
        self.t: D = None
        self.o: A = None
        self.txt = txt

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

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

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

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