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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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