class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: F = None
        self.p: D = None
        self.w: D = None
        self.q: E = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: E = None
        self.y: H = None
        self.p: H = None
        self.r: A = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: D = None
        self.r: C = None
        self.o: C = None
        self.x: C = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: B = None
        self.y: A = None
        self.p: A = None
        self.w: D = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: A = None
        self.txt = txt

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

h.v = c
h.x = c
h.s = b
h.p = j
h.w = n
h.q = l
g.x = l
g.v = l
g.y = k
g.p = k
g.r = h
g.s = c
c.s = g
n.v = k
n.r = j
l.w = b
b.w = h
b.p = n
b.r = c
b.o = c
b.x = c
b.s = j
e.o = d
e.v = g
e.u = g
e.y = h
e.p = h
e.w = n
k.w = g
k.q = h
d.o = e
d.v = g
d.u = g
d.y = h
d.p = h
d.w = j
j.v = k
j.r = n
assert h.s.s.v.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: F = None
        self.p: D = None
        self.w: D = None
        self.q: E = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: E = None
        self.y: H = None
        self.p: H = None
        self.r: A = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: D = None
        self.r: C = None
        self.o: C = None
        self.x: C = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: B = None
        self.y: A = None
        self.p: A = None
        self.w: D = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: A = None
        self.txt = txt

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

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