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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: A = None
        self.s: F = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: H = None
        self.y: I = None
        self.s: I = None
        self.o: A = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: A = None
        self.s: F = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: H = None
        self.y: I = None
        self.s: I = None
        self.o: A = None
        self.v: F = None
        self.txt = txt

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

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