class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: H = None
        self.u: C = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: G = None
        self.o: E = None
        self.z: C = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.o: G = None
        self.y: F = None
        self.w: E = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: H = None
        self.z: I = None
        self.t: C = None
        self.s: C = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: B = None
        self.s: A = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: G = None
        self.o: E = None
        self.z: C = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.o: G = None
        self.y: F = None
        self.w: E = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: H = None
        self.z: I = None
        self.t: C = None
        self.s: C = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: B = None
        self.s: A = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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