class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: H = None
        self.x: A = None
        self.s: A = None
        self.v: G = None
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.z: D = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: I = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: H = None
        self.r: H = None
        self.s: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: H = None
        self.x: A = None
        self.s: A = None
        self.v: G = None
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.z: D = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: I = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: H = None
        self.r: H = None
        self.s: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: G = None
        self.txt = txt

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

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