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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: C = None
        self.t: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: F = None
        self.y: A = None
        self.u: E = None
        self.x: H = None
        self.z: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: H = None
        self.q: D = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: C = None
        self.t: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: F = None
        self.y: A = None
        self.u: E = None
        self.x: H = None
        self.z: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: H = None
        self.q: D = None
        self.v: D = None
        self.txt = txt

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

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