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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: I = None
        self.t: E = None
        self.r: C = None
        self.y: F = None
        self.p: J = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: B = None
        self.z: I = None
        self.p: G = None
        self.q: E = None
        self.o: J = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: C = None
        self.r: A = None
        self.q: A = None
        self.v: H = None
        self.y: F = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: I = None
        self.x: I = None
        self.t: F = None
        self.y: I = None
        self.o: I = None
        self.s: B = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: B = None
        self.p: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: I = None
        self.t: E = None
        self.r: C = None
        self.y: F = None
        self.p: J = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: B = None
        self.z: I = None
        self.p: G = None
        self.q: E = None
        self.o: J = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: C = None
        self.r: A = None
        self.q: A = None
        self.v: H = None
        self.y: F = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: I = None
        self.x: I = None
        self.t: F = None
        self.y: I = None
        self.o: I = None
        self.s: B = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: B = None
        self.p: H = None
        self.txt = txt

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

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