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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: B = None
        self.q: C = None
        self.u: C = None
        self.z: G = None
        self.o: C = None
        self.txt = txt

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

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

e = A("e")
d = B("d")
g = C("g")
f = D("f")
m = E("m")
j = F("j")
h = G("h")
c = H("c")
n = E("n")

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: B = None
        self.q: C = None
        self.u: C = None
        self.z: G = None
        self.o: C = None
        self.txt = txt

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

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

e = A("e")
d = B("d")
g = C("g")
f = D("f")
m = E("m")
j = F("j")
h = G("h")
c = H("c")
n = E("n")

e.s = m
e.o = h
e.v = d
d.v = e
d.y = f
g.w = d
g.t = h
g.o = m
g.s = e
g.z = e
f.z = j
m.p = e
j.y = g
j.q = g
j.u = g
j.o = g
j.r = d
j.z = h
h.x = f
h.s = f
h.u = g
h.r = g
h.p = n
h.v = d
c.w = g
c.r = d
c.s = d
c.x = d
c.z = e
c.p = m
c.y = j
c.v = n
n.p = e
assert j.q.t.r.txt == "g"