class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: G = None
        self.y: D = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: E = None
        self.t: I = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: I = None
        self.v: I = None
        self.s: D = None
        self.y: D = None
        self.x: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: J = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: H = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.q: F = None
        self.t: B = None
        self.w: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: D = None
        self.o: E = None
        self.v: F = None
        self.u: H = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: E = None
        self.t: I = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: I = None
        self.v: I = None
        self.s: D = None
        self.y: D = None
        self.x: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: J = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: H = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.q: F = None
        self.t: B = None
        self.w: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: D = None
        self.o: E = None
        self.v: F = None
        self.u: H = None
        self.s: A = None
        self.txt = txt

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

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