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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.u: C = None
        self.x: C = None
        self.y: E = None
        self.o: D = None
        self.z: E = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: G = None
        self.y: F = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: F = None
        self.o: A = None
        self.t: B = None
        self.w: C = None
        self.u: F = None
        self.s: C = None
        self.txt = txt

e = A("e")
a = B("a")
n = C("n")
g = D("g")
i = E("i")
b = F("b")
f = G("f")
c = H("c")
m = G("m")

e.v = i
e.o = i
e.w = n
e.y = c
e.q = c
e.p = g
e.r = f
e.s = a
a.t = b
a.p = b
a.u = n
a.x = n
a.y = i
a.z = i
a.o = g
a.q = m
n.r = e
n.y = a
g.y = i
i.o = n
i.r = n
i.v = f
i.y = b
b.u = n
b.x = a
f.w = i
c.y = i
c.z = b
c.u = b
c.o = e
c.t = a
c.w = n
c.s = n
m.w = i
assert n.r.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: C = None
        self.y: H = None
        self.q: H = None
        self.o: E = None
        self.p: D = None
        self.r: G = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.u: C = None
        self.x: C = None
        self.y: E = None
        self.o: D = None
        self.z: E = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: G = None
        self.y: F = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: F = None
        self.o: A = None
        self.t: B = None
        self.w: C = None
        self.u: F = None
        self.s: C = None
        self.txt = txt

e = A("e")
a = B("a")
n = C("n")
g = D("g")
i = E("i")
b = F("b")
f = G("f")
c = H("c")
m = G("m")

e.v = i
e.o = i
e.w = n
e.y = c
e.q = c
e.p = g
e.r = f
e.s = a
a.t = b
a.p = b
a.u = n
a.x = n
a.y = i
a.z = i
a.o = g
a.q = m
n.r = e
n.y = a
g.y = i
i.o = n
i.r = n
i.v = f
i.y = b
b.u = n
b.x = a
f.w = i
c.y = i
c.z = b
c.u = b
c.o = e
c.t = a
c.w = n
c.s = n
m.w = i
assert n.r.s.o.txt == "g"