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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: I = None
        self.y: C = None
        self.s: D = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.v: I = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.r: D = None
        self.t: C = None
        self.y: I = None
        self.w: I = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: H = None
        self.y: H = None
        self.o: C = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: I = None
        self.y: C = None
        self.s: D = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.v: I = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.r: D = None
        self.t: C = None
        self.y: I = None
        self.w: I = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: H = None
        self.y: H = None
        self.o: C = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: F = None
        self.txt = txt

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

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