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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: E = None
        self.txt = txt

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

d.p = e
d.v = f
d.x = n
d.z = h
d.q = j
d.w = j
j.w = f
j.z = k
j.t = d
j.v = d
j.r = n
j.o = e
c.v = k
c.o = d
c.s = d
c.t = a
c.z = f
c.p = j
c.q = h
f.r = c
a.s = k
n.p = e
n.z = d
k.r = f
k.o = c
k.t = e
k.x = e
k.q = d
k.p = a
e.s = j
e.p = a
h.r = f
h.o = c
h.t = e
h.x = e
h.q = d
h.p = a
assert j.w.r.p.r.p.s.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: D = None
        self.x: F = None
        self.z: G = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: E = None
        self.txt = txt

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

d.p = e
d.v = f
d.x = n
d.z = h
d.q = j
d.w = j
j.w = f
j.z = k
j.t = d
j.v = d
j.r = n
j.o = e
c.v = k
c.o = d
c.s = d
c.t = a
c.z = f
c.p = j
c.q = h
f.r = c
a.s = k
n.p = e
n.z = d
k.r = f
k.o = c
k.t = e
k.x = e
k.q = d
k.p = a
e.s = j
e.p = a
h.r = f
h.o = c
h.t = e
h.x = e
h.q = d
h.p = a
assert j.w.r.p.r.p.s.t.v.txt == "f"