class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: H = None
        self.q: G = None
        self.s: H = None
        self.x: H = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: H = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: A = None
        self.v: J = None
        self.s: G = None
        self.y: B = None
        self.x: E = None
        self.t: I = None
        self.w: I = None
        self.p: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: H = None
        self.u: H = None
        self.z: D = None
        self.w: D = None
        self.r: B = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: H = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: A = None
        self.v: J = None
        self.s: G = None
        self.y: B = None
        self.x: E = None
        self.t: I = None
        self.w: I = None
        self.p: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: H = None
        self.u: H = None
        self.z: D = None
        self.w: D = None
        self.r: B = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

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