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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: G = None
        self.p: A = None
        self.o: H = None
        self.v: A = None
        self.w: D = None
        self.x: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: C = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: G = None
        self.p: A = None
        self.o: H = None
        self.v: A = None
        self.w: D = None
        self.x: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: C = None
        self.s: F = None
        self.txt = txt

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

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