class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: H = None
        self.w: E = None
        self.x: F = None
        self.t: H = None
        self.r: H = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: E = None
        self.v: H = None
        self.t: G = None
        self.r: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: H = None
        self.t: H = None
        self.s: G = None
        self.o: E = None
        self.u: F = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: B = None
        self.r: C = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: E = None
        self.v: H = None
        self.t: G = None
        self.r: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: H = None
        self.t: H = None
        self.s: G = None
        self.o: E = None
        self.u: F = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: B = None
        self.r: C = None
        self.p: C = None
        self.txt = txt

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

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