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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: J = None
        self.r: H = None
        self.p: I = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: J = None
        self.q: F = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: E = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: J = None
        self.w: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.p: J = None
        self.s: A = None
        self.z: J = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: D = None
        self.q: A = None
        self.s: G = None
        self.y: B = None
        self.txt = txt

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

a.w = n
l.t = f
l.r = f
l.w = i
l.p = g
l.s = k
n.y = a
n.o = i
n.q = k
n.p = e
m.y = e
m.z = j
m.q = f
j.y = l
j.p = i
j.w = a
k.r = g
e.z = g
e.q = g
e.r = i
e.w = i
e.y = m
e.o = n
e.t = k
e.v = l
e.x = j
f.t = k
f.v = n
f.p = i
f.z = i
f.s = a
f.r = l
g.v = l
g.q = n
g.t = f
g.w = i
i.w = e
i.s = e
i.r = m
i.q = a
i.y = l
assert f.v.o.s.r.r.y.r.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: J = None
        self.r: H = None
        self.p: I = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: J = None
        self.q: F = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: E = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: J = None
        self.w: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.p: J = None
        self.s: A = None
        self.z: J = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: D = None
        self.q: A = None
        self.s: G = None
        self.y: B = None
        self.txt = txt

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

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