class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: G = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: C = None
        self.q: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: C = None
        self.q: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

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

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