class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: H = None
        self.q: H = None
        self.z: E = None
        self.u: E = None
        self.s: H = None
        self.y: H = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: E = None
        self.v: G = None
        self.w: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.r: A = None
        self.q: F = None
        self.txt = txt

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

g.w = a
g.z = a
g.u = a
g.o = i
g.q = i
g.s = i
g.y = i
g.p = i
n.z = a
n.q = c
c.q = l
l.w = h
l.q = j
a.z = e
a.v = e
a.y = n
a.p = c
a.x = l
j.s = n
j.p = a
j.v = e
j.w = c
e.x = c
e.z = c
e.s = c
e.v = n
e.u = n
e.q = g
e.o = l
e.y = a
e.t = j
i.q = j
i.v = h
h.s = g
h.r = g
h.x = j
h.q = j
assert g.s.v.s.o.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: H = None
        self.q: H = None
        self.z: E = None
        self.u: E = None
        self.s: H = None
        self.y: H = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: E = None
        self.v: G = None
        self.w: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.r: A = None
        self.q: F = None
        self.txt = txt

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

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