class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.y: J = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: B = None
        self.q: E = None
        self.z: I = None
        self.r: I = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: E = None
        self.o: B = None
        self.p: H = None
        self.w: J = None
        self.s: I = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: E = None
        self.r: A = None
        self.t: I = None
        self.x: E = None
        self.s: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.y: J = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: B = None
        self.q: E = None
        self.z: I = None
        self.r: I = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: E = None
        self.o: B = None
        self.p: H = None
        self.w: J = None
        self.s: I = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: E = None
        self.r: A = None
        self.t: I = None
        self.x: E = None
        self.s: I = None
        self.txt = txt

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

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

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

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