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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: H = None
        self.x: C = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: H = None
        self.x: C = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

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