class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: B = None
        self.x: C = None
        self.q: C = None
        self.z: D = None
        self.t: D = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: G = None
        self.s: G = None
        self.z: H = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: C = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: E = None
        self.v: J = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: G = None
        self.s: G = None
        self.z: H = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: C = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: E = None
        self.v: J = None
        self.w: B = None
        self.txt = txt

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

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

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

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