class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: D = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: D = None
        self.v: J = None
        self.x: I = None
        self.w: H = None
        self.p: C = None
        self.q: F = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: H = None
        self.y: B = None
        self.p: I = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: I = None
        self.w: A = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: I = None
        self.o: J = None
        self.x: F = None
        self.q: B = None
        self.v: H = None
        self.r: A = None
        self.u: C = None
        self.w: I = None
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: C = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: D = None
        self.t: B = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: C = None
        self.r: H = None
        self.p: A = None
        self.s: E = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: D = None
        self.v: J = None
        self.x: I = None
        self.w: H = None
        self.p: C = None
        self.q: F = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: H = None
        self.y: B = None
        self.p: I = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: I = None
        self.w: A = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: I = None
        self.o: J = None
        self.x: F = None
        self.q: B = None
        self.v: H = None
        self.r: A = None
        self.u: C = None
        self.w: I = None
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: C = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: D = None
        self.t: B = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: C = None
        self.r: H = None
        self.p: A = None
        self.s: E = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

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