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

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

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: E = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: J = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: B = None
        self.p: I = None
        self.t: J = None
        self.v: E = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: C = None
        self.z: E = None
        self.x: H = None
        self.v: H = None
        self.p: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: F = None
        self.o: A = None
        self.x: H = None
        self.r: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: E = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: J = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: B = None
        self.p: I = None
        self.t: J = None
        self.v: E = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: C = None
        self.z: E = None
        self.x: H = None
        self.v: H = None
        self.p: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: F = None
        self.o: A = None
        self.x: H = None
        self.r: D = None
        self.txt = txt

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

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