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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: H = None
        self.y: A = None
        self.o: B = None
        self.u: I = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: I = None
        self.p: E = None
        self.t: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: H = None
        self.y: A = None
        self.o: B = None
        self.u: I = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: I = None
        self.p: E = None
        self.t: D = None
        self.txt = txt

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

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