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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: A = None
        self.u: F = None
        self.o: F = None
        self.x: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: H = None
        self.o: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: A = None
        self.u: F = None
        self.o: F = None
        self.x: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: H = None
        self.o: F = None
        self.txt = txt

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

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

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