class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: E = None
        self.q: F = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: G = None
        self.t: C = None
        self.v: E = None
        self.z: D = None
        self.r: I = None
        self.p: B = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: G = None
        self.t: C = None
        self.v: E = None
        self.z: D = None
        self.r: I = None
        self.p: B = None
        self.o: H = None
        self.txt = txt

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

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

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