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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: E = None
        self.w: A = None
        self.t: H = None
        self.y: H = None
        self.z: H = None
        self.v: F = None
        self.x: H = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: A = None
        self.p: A = None
        self.t: A = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: D = None
        self.r: B = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: D = None
        self.z: A = None
        self.o: B = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: A = None
        self.s: B = None
        self.u: G = None
        self.w: E = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: D = None
        self.t: A = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: E = None
        self.w: A = None
        self.t: H = None
        self.y: H = None
        self.z: H = None
        self.v: F = None
        self.x: H = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: A = None
        self.p: A = None
        self.t: A = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: D = None
        self.r: B = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: D = None
        self.z: A = None
        self.o: B = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: A = None
        self.s: B = None
        self.u: G = None
        self.w: E = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: D = None
        self.t: A = None
        self.y: B = None
        self.txt = txt

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

a.z = g
a.p = m
a.o = f
j.q = m
j.r = k
j.w = a
j.o = a
j.t = h
j.y = h
j.z = h
j.x = h
j.v = f
g.q = k
c.r = f
c.u = a
c.p = a
c.t = a
c.w = l
k.y = m
k.s = c
k.r = j
k.q = g
f.p = g
l.w = h
l.u = c
l.z = a
l.o = j
l.p = f
h.y = k
h.w = k
h.v = a
h.z = a
h.s = j
h.u = l
m.v = k
m.s = c
m.t = a
m.y = j
assert f.p.q.r.o.z.q.r.v.p.txt == "g"