class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: I = None
        self.o: J = None
        self.q: C = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: I = None
        self.p: G = None
        self.z: I = None
        self.y: I = None
        self.w: G = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: J = None
        self.p: A = None
        self.x: I = None
        self.v: I = None
        self.s: I = None
        self.q: C = None
        self.u: C = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: A = None
        self.v: I = None
        self.s: C = None
        self.o: B = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: F = None
        self.r: C = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: J = None
        self.q: C = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: G = None
        self.x: A = None
        self.w: B = None
        self.y: E = None
        self.t: D = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: I = None
        self.p: G = None
        self.z: I = None
        self.y: I = None
        self.w: G = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: J = None
        self.p: A = None
        self.x: I = None
        self.v: I = None
        self.s: I = None
        self.q: C = None
        self.u: C = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: A = None
        self.v: I = None
        self.s: C = None
        self.o: B = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: F = None
        self.r: C = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: J = None
        self.q: C = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: G = None
        self.x: A = None
        self.w: B = None
        self.y: E = None
        self.t: D = None
        self.r: D = None
        self.txt = txt

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

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