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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.u: G = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.p: B = None
        self.q: B = None
        self.r: C = None
        self.txt = txt

n = A("n")
b = B("b")
c = C("c")
j = D("j")
d = E("d")
m = F("m")
h = G("h")
e = H("e")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.u: G = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.p: B = None
        self.q: B = None
        self.r: C = None
        self.txt = txt

n = A("n")
b = B("b")
c = C("c")
j = D("j")
d = E("d")
m = F("m")
h = G("h")
e = H("e")

n.s = e
b.v = e
b.s = n
b.t = h
b.x = h
b.p = m
b.u = j
c.y = h
c.v = h
c.s = m
c.x = d
c.o = d
c.q = d
c.w = b
j.p = e
d.v = m
d.x = m
d.u = h
d.t = b
m.p = c
m.z = c
m.w = c
m.o = b
m.r = j
m.u = n
m.y = n
h.o = c
e.y = j
e.t = j
e.p = b
e.q = b
e.r = c
assert b.p.u.s.t.p.r.v.o.txt == "c"