class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: E = None
        self.r: F = None
        self.q: B = None
        self.v: E = None
        self.y: H = None
        self.p: B = None
        self.u: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: F = None
        self.z: F = None
        self.x: E = None
        self.w: A = None
        self.p: F = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.o: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: B = None
        self.o: E = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: D = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: F = None
        self.t: A = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: F = None
        self.z: F = None
        self.x: E = None
        self.w: A = None
        self.p: F = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.o: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: B = None
        self.o: E = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: D = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: F = None
        self.t: A = None
        self.w: B = None
        self.txt = txt

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

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