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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: F = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: G = None
        self.u: F = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: C = None
        self.w: A = None
        self.z: C = None
        self.p: F = None
        self.x: F = None
        self.r: F = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: A = None
        self.x: B = None
        self.s: C = None
        self.r: H = None
        self.u: E = None
        self.q: A = None
        self.txt = txt

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

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

g = A("g")
e = B("e")
f = C("f")
l = D("l")
n = E("n")
h = F("h")
c = G("c")
i = H("i")

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: F = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: G = None
        self.u: F = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: C = None
        self.w: A = None
        self.z: C = None
        self.p: F = None
        self.x: F = None
        self.r: F = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: A = None
        self.x: B = None
        self.s: C = None
        self.r: H = None
        self.u: E = None
        self.q: A = None
        self.txt = txt

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

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

g = A("g")
e = B("e")
f = C("f")
l = D("l")
n = E("n")
h = F("h")
c = G("c")
i = H("i")

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