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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: E = None
        self.t: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: A = None
        self.q: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: E = None
        self.t: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: A = None
        self.q: F = None
        self.txt = txt

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

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

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