class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: E = None
        self.x: D = None
        self.v: C = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.u: C = None
        self.r: D = None
        self.p: A = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.u: C = None
        self.r: D = None
        self.p: A = None
        self.x: F = None
        self.txt = txt

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

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

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