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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: A = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.x: E = None
        self.y: H = None
        self.o: G = None
        self.r: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: A = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.x: E = None
        self.y: H = None
        self.o: G = None
        self.r: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.txt = txt

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

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