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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: I = None
        self.y: E = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

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

b = A("b")
e = B("e")
k = C("k")
d = D("d")
h = E("h")
l = F("l")
f = G("f")
i = H("i")
j = I("j")
a = J("a")

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: I = None
        self.y: E = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

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

b = A("b")
e = B("e")
k = C("k")
d = D("d")
h = E("h")
l = F("l")
f = G("f")
i = H("i")
j = I("j")
a = J("a")

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