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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: B = None
        self.y: C = None
        self.t: H = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

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

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

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

j = A("j")
k = B("k")
e = C("e")
a = D("a")
m = E("m")
d = F("d")
b = G("b")
f = H("f")
g = G("g")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: B = None
        self.y: C = None
        self.t: H = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

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

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

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

j = A("j")
k = B("k")
e = C("e")
a = D("a")
m = E("m")
d = F("d")
b = G("b")
f = H("f")
g = G("g")

j.x = m
k.o = f
k.p = f
k.v = d
e.v = f
a.s = b
a.p = e
m.x = a
m.o = k
m.y = e
m.t = f
m.q = j
m.z = j
d.v = k
b.y = j
b.u = e
b.w = g
b.s = k
b.o = d
b.r = a
b.v = f
f.y = m
f.v = m
f.q = b
f.t = b
f.o = d
f.z = k
f.p = k
f.s = a
g.y = j
g.u = e
g.w = b
g.s = k
g.o = d
g.r = a
g.v = f
assert e.v.o.v.v.v.v.v.v.txt == "d"