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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: I = None
        self.u: E = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: J = None
        self.y: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: B = None
        self.t: C = None
        self.q: C = None
        self.u: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: H = None
        self.w: C = None
        self.o: A = None
        self.txt = txt

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

g.r = d
g.q = d
g.u = j
g.p = k
g.w = n
g.y = b
g.t = h
k.x = g
k.o = j
k.u = f
k.t = n
h.q = f
m.r = h
m.q = d
m.y = f
f.z = d
f.w = d
f.y = h
f.q = h
f.o = b
f.x = j
f.u = g
f.r = k
n.r = b
i.r = f
i.z = k
i.t = h
i.q = h
i.u = b
b.z = n
b.x = g
b.o = g
b.r = i
b.w = i
b.p = i
b.v = m
b.q = m
b.y = d
b.u = j
j.z = i
j.u = i
j.v = n
j.o = m
d.r = j
d.y = b
d.w = h
d.o = g
assert m.y.w.o.r.r.u.txt == "
class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: I = None
        self.p: B = None
        self.w: F = None
        self.y: H = None
        self.q: J = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: I = None
        self.u: E = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: J = None
        self.y: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: B = None
        self.t: C = None
        self.q: C = None
        self.u: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: H = None
        self.w: C = None
        self.o: A = None
        self.txt = txt

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

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