class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: F = None
        self.q: F = None
        self.x: E = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: A = None
        self.u: D = None
        self.w: I = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: B = None
        self.o: H = None
        self.w: I = None
        self.u: B = None
        self.z: D = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: E = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: D = None
        self.u: F = None
        self.p: F = None
        self.v: A = None
        self.q: G = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: F = None
        self.q: F = None
        self.x: E = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: A = None
        self.u: D = None
        self.w: I = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: B = None
        self.o: H = None
        self.w: I = None
        self.u: B = None
        self.z: D = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: E = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: D = None
        self.u: F = None
        self.p: F = None
        self.v: A = None
        self.q: G = None
        self.t: F = None
        self.txt = txt

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

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