class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: D = None
        self.z: J = None
        self.s: G = None
        self.y: D = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: C = None
        self.x: D = None
        self.s: J = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: A = None
        self.o: F = None
        self.v: C = None
        self.q: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: G = None
        self.u: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: C = None
        self.x: D = None
        self.s: J = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: A = None
        self.o: F = None
        self.v: C = None
        self.q: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: G = None
        self.u: I = None
        self.txt = txt

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

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