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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: C = None
        self.r: G = None
        self.p: E = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: J = None
        self.u: J = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: C = None
        self.r: G = None
        self.p: E = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: J = None
        self.u: J = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

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