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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.s: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: E = None
        self.y: H = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.s: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: E = None
        self.y: H = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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