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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: C = None
        self.q: E = None
        self.y: E = None
        self.p: E = None
        self.r: C = None
        self.v: A = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: C = None
        self.q: E = None
        self.y: E = None
        self.p: E = None
        self.r: C = None
        self.v: A = None
        self.s: E = None
        self.txt = txt

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

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

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