class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: A = None
        self.u: F = None
        self.s: G = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.q: F = None
        self.u: E = None
        self.o: A = None
        self.x: A = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: A = None
        self.u: F = None
        self.s: G = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.q: F = None
        self.u: E = None
        self.o: A = None
        self.x: A = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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