class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: D = None
        self.w: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: E = None
        self.p: D = None
        self.z: E = None
        self.u: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: E = None
        self.p: D = None
        self.z: E = None
        self.u: G = None
        self.txt = txt

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

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