class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: D = None
        self.s: H = None
        self.o: D = None
        self.x: G = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: E = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: C = None
        self.o: C = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: B = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: B = None
        self.u: B = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: E = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: C = None
        self.o: C = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: B = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: B = None
        self.u: B = None
        self.z: B = None
        self.txt = txt

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

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