class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: C = None
        self.t: C = None
        self.y: D = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: F = None
        self.x: G = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: C = None
        self.z: C = None
        self.y: B = None
        self.q: D = None
        self.o: A = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: H = None
        self.t: E = None
        self.v: H = None
        self.z: B = None
        self.w: H = None
        self.txt = txt

c = A("c")
e = B("e")
j = C("j")
l = D("l")
f = E("f")
m = F("m")
h = G("h")
d = H("d")
g = I("g")

c.v = d
c.x = j
c.t = j
c.y = l
c.o = f
e.v = l
e.q = g
j.q = m
j.s = m
j.x = h
j.v = h
l.v = e
l.o = m
l.y = g
f.w = g
f.s = j
f.z = j
f.y = e
f.q = l
f.o = c
f.u = c
m.v = j
m.w = d
h.v = c
h.s = l
h.q = l
h.y = l
h.x = e
d.s = e
g.u = j
g.s = d
g.v = d
g.w = d
g.t = f
g.z = e
assert g.z.v.y.t.w.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: C = None
        self.t: C = None
        self.y: D = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: F = None
        self.x: G = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: C = None
        self.z: C = None
        self.y: B = None
        self.q: D = None
        self.o: A = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: H = None
        self.t: E = None
        self.v: H = None
        self.z: B = None
        self.w: H = None
        self.txt = txt

c = A("c")
e = B("e")
j = C("j")
l = D("l")
f = E("f")
m = F("m")
h = G("h")
d = H("d")
g = I("g")

c.v = d
c.x = j
c.t = j
c.y = l
c.o = f
e.v = l
e.q = g
j.q = m
j.s = m
j.x = h
j.v = h
l.v = e
l.o = m
l.y = g
f.w = g
f.s = j
f.z = j
f.y = e
f.q = l
f.o = c
f.u = c
m.v = j
m.w = d
h.v = c
h.s = l
h.q = l
h.y = l
h.x = e
d.s = e
g.u = j
g.s = d
g.v = d
g.w = d
g.t = f
g.z = e
assert g.z.v.y.t.w.z.v.txt == "l"