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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: B = None
        self.o: G = None
        self.u: H = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: E = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: C = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.p: A = None
        self.s: G = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: E = None
        self.v: F = None
        self.z: D = None
        self.p: F = None
        self.s: A = None
        self.o: F = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: B = None
        self.o: G = None
        self.u: H = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: E = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: C = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.p: A = None
        self.s: G = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: E = None
        self.v: F = None
        self.z: D = None
        self.p: F = None
        self.s: A = None
        self.o: F = None
        self.u: B = None
        self.txt = txt

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

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

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