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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: H = None
        self.v: A = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: E = None
        self.r: B = None
        self.u: G = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: J = None
        self.t: I = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: G = None
        self.v: F = None
        self.o: J = None
        self.u: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: H = None
        self.v: A = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: E = None
        self.r: B = None
        self.u: G = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: J = None
        self.t: I = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: G = None
        self.v: F = None
        self.o: J = None
        self.u: C = None
        self.txt = txt

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

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

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