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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: E = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: H = None
        self.w: H = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: E = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: H = None
        self.w: H = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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