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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: B = None
        self.y: H = None
        self.p: B = None
        self.o: D = None
        self.x: D = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: D = None
        self.r: F = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: A = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: B = None
        self.y: H = None
        self.p: B = None
        self.o: D = None
        self.x: D = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: D = None
        self.r: F = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: A = None
        self.o: G = None
        self.txt = txt

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

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