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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: H = None
        self.y: C = None
        self.t: B = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: H = None
        self.y: C = None
        self.t: B = None
        self.s: B = None
        self.txt = txt

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

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

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

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