class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: F = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: A = None
        self.z: I = None
        self.s: G = None
        self.r: E = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: B = None
        self.z: D = None
        self.s: C = None
        self.y: B = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: F = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: A = None
        self.z: I = None
        self.s: G = None
        self.r: E = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: B = None
        self.z: D = None
        self.s: C = None
        self.y: B = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: E = None
        self.txt = txt

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

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