class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: C = None
        self.s: D = None
        self.p: D = None
        self.x: E = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.u: F = None
        self.w: G = None
        self.z: H = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: G = None
        self.q: A = None
        self.y: D = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: D = None
        self.w: H = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: A = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: C = None
        self.w: E = None
        self.z: G = None
        self.x: B = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.u: F = None
        self.w: G = None
        self.z: H = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: G = None
        self.q: A = None
        self.y: D = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: D = None
        self.w: H = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: A = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: C = None
        self.w: E = None
        self.z: G = None
        self.x: B = None
        self.o: F = None
        self.txt = txt

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

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