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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: I = None
        self.u: F = None
        self.z: I = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: C = None
        self.t: H = None
        self.u: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: E = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.t: D = None
        self.r: E = None
        self.u: D = None
        self.x: E = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: B = None
        self.y: F = None
        self.w: H = None
        self.r: E = None
        self.p: C = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: I = None
        self.u: F = None
        self.z: I = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: C = None
        self.t: H = None
        self.u: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: E = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.t: D = None
        self.r: E = None
        self.u: D = None
        self.x: E = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: B = None
        self.y: F = None
        self.w: H = None
        self.r: E = None
        self.p: C = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

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

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