class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: G = None
        self.w: G = None
        self.r: G = None
        self.o: H = None
        self.x: J = None
        self.v: J = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: D = None
        self.x: E = None
        self.u: H = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: A = None
        self.q: A = None
        self.o: A = None
        self.r: C = None
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: E = None
        self.y: G = None
        self.t: F = None
        self.p: G = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: E = None
        self.s: G = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: D = None
        self.x: E = None
        self.u: H = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: A = None
        self.q: A = None
        self.o: A = None
        self.r: C = None
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: E = None
        self.y: G = None
        self.t: F = None
        self.p: G = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: E = None
        self.s: G = None
        self.p: A = None
        self.txt = txt

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

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