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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: F = None
        self.v: A = None
        self.y: C = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.v: D = None
        self.s: B = None
        self.u: D = None
        self.txt = txt

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

h = A("h")
m = B("m")
a = C("a")
g = D("g")
c = E("c")
b = F("b")
n = G("n")
l = F("l")

h.s = m
m.o = g
m.z = g
m.r = g
m.y = g
m.s = n
m.v = b
a.u = c
g.s = m
g.r = b
g.z = b
g.v = h
g.y = a
c.y = g
c.w = g
c.r = g
c.v = n
c.o = a
c.s = h
c.u = m
b.r = l
b.x = g
b.v = g
b.u = g
b.s = m
n.r = h
l.r = b
l.x = g
l.v = g
l.u = g
l.s = m
assert g.z.s.y.y.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: F = None
        self.v: A = None
        self.y: C = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.v: D = None
        self.s: B = None
        self.u: D = None
        self.txt = txt

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

h = A("h")
m = B("m")
a = C("a")
g = D("g")
c = E("c")
b = F("b")
n = G("n")
l = F("l")

h.s = m
m.o = g
m.z = g
m.r = g
m.y = g
m.s = n
m.v = b
a.u = c
g.s = m
g.r = b
g.z = b
g.v = h
g.y = a
c.y = g
c.w = g
c.r = g
c.v = n
c.o = a
c.s = h
c.u = m
b.r = l
b.x = g
b.v = g
b.u = g
b.s = m
n.r = h
l.r = b
l.x = g
l.v = g
l.u = g
l.s = m
assert g.z.s.y.y.u.v.txt == "n"