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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: F = None
        self.s: F = None
        self.q: H = None
        self.t: E = None
        self.w: G = None
        self.u: H = None
        self.v: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: E = None
        self.y: A = None
        self.q: A = None
        self.t: E = None
        self.r: B = None
        self.p: D = None
        self.txt = txt

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

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

c.p = n
c.x = a
c.s = l
c.v = j
j.w = l
j.u = l
e.t = c
e.u = f
e.w = f
k.p = a
k.t = a
k.x = f
k.s = f
k.q = n
k.u = n
k.v = n
k.w = l
a.w = l
a.u = n
a.x = e
f.y = a
l.z = a
l.u = a
l.t = a
l.y = c
l.q = c
l.r = j
l.p = k
n.p = j
n.x = j
n.z = c
n.v = c
n.r = k
n.y = e
assert f.y.x.t.x.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: E = None
        self.s: G = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: F = None
        self.s: F = None
        self.q: H = None
        self.t: E = None
        self.w: G = None
        self.u: H = None
        self.v: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: E = None
        self.y: A = None
        self.q: A = None
        self.t: E = None
        self.r: B = None
        self.p: D = None
        self.txt = txt

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

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

c.p = n
c.x = a
c.s = l
c.v = j
j.w = l
j.u = l
e.t = c
e.u = f
e.w = f
k.p = a
k.t = a
k.x = f
k.s = f
k.q = n
k.u = n
k.v = n
k.w = l
a.w = l
a.u = n
a.x = e
f.y = a
l.z = a
l.u = a
l.t = a
l.y = c
l.q = c
l.r = j
l.p = k
n.p = j
n.x = j
n.z = c
n.v = c
n.r = k
n.y = e
assert f.y.x.t.x.w.u.txt == "a"