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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: F = None
        self.q: H = None
        self.u: G = None
        self.x: A = None
        self.v: B = None
        self.s: B = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: H = None
        self.p: H = None
        self.w: A = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: F = None
        self.q: H = None
        self.u: G = None
        self.x: A = None
        self.v: B = None
        self.s: B = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: H = None
        self.p: H = None
        self.w: A = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: C = None
        self.z: A = None
        self.txt = txt

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

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

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