class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: F = None
        self.o: B = None
        self.w: B = None
        self.p: B = None
        self.u: I = None
        self.q: D = None
        self.v: H = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: G = None
        self.u: E = None
        self.z: D = None
        self.t: H = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: G = None
        self.q: F = None
        self.x: B = None
        self.o: I = None
        self.u: G = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: I = None
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: C = None
        self.u: I = None
        self.y: A = None
        self.r: F = None
        self.o: E = None
        self.t: C = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: G = None
        self.u: E = None
        self.z: D = None
        self.t: H = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: G = None
        self.q: F = None
        self.x: B = None
        self.o: I = None
        self.u: G = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: I = None
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: C = None
        self.u: I = None
        self.y: A = None
        self.r: F = None
        self.o: E = None
        self.t: C = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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