class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: G = None
        self.o: B = None
        self.v: C = None
        self.t: I = None
        self.y: C = None
        self.w: C = None
        self.s: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: I = None
        self.v: D = None
        self.t: I = None
        self.w: B = None
        self.x: I = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: I = None
        self.v: D = None
        self.t: I = None
        self.w: B = None
        self.x: I = None
        self.o: I = None
        self.txt = txt

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

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

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

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