class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: H = None
        self.p: A = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: D = None
        self.q: B = None
        self.z: C = None
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: H = None
        self.p: A = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: D = None
        self.q: B = None
        self.z: C = None
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: G = None
        self.txt = txt

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

i.p = k
i.z = g
e.q = f
e.r = j
e.x = j
e.z = j
e.o = b
e.w = k
a.u = j
a.p = k
k.z = e
c.v = h
c.w = f
c.p = i
c.q = k
g.t = k
g.r = k
g.w = k
g.q = e
g.z = a
j.r = i
f.q = e
f.u = j
f.z = h
f.s = k
f.o = b
f.v = b
f.w = g
b.z = f
b.t = j
h.u = j
h.p = k
assert i.p.z.w.z.o.z.txt == "f"