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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: A = None
        self.u: F = None
        self.p: E = None
        self.w: C = None
        self.o: C = None
        self.v: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: E = None
        self.u: D = None
        self.txt = txt

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

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

l = A("l")
f = B("f")
h = C("h")
g = D("g")
i = E("i")
j = F("j")
c = G("c")
k = H("k")
b = G("b")
n = F("n")

l.z = h
l.t = i
f.y = k
f.s = l
f.v = l
f.u = j
f.p = i
f.w = h
f.o = h
h.r = l
h.p = c
h.s = i
h.y = i
h.v = k
g.w = l
g.v = k
i.p = f
i.r = h
i.s = k
j.x = k
j.v = i
j.u = g
c.y = h
c.t = b
c.z = l
c.u = f
c.p = k
k.p = c
k.o = j
k.t = f
b.y = h
b.t = c
b.z = l
b.u = f
b.p = k
n.x = k
n.v = i
n.u = g
assert n.v.p.y.o.u.w.t.p.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: A = None
        self.u: F = None
        self.p: E = None
        self.w: C = None
        self.o: C = None
        self.v: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: E = None
        self.u: D = None
        self.txt = txt

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

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

l = A("l")
f = B("f")
h = C("h")
g = D("g")
i = E("i")
j = F("j")
c = G("c")
k = H("k")
b = G("b")
n = F("n")

l.z = h
l.t = i
f.y = k
f.s = l
f.v = l
f.u = j
f.p = i
f.w = h
f.o = h
h.r = l
h.p = c
h.s = i
h.y = i
h.v = k
g.w = l
g.v = k
i.p = f
i.r = h
i.s = k
j.x = k
j.v = i
j.u = g
c.y = h
c.t = b
c.z = l
c.u = f
c.p = k
k.p = c
k.o = j
k.t = f
b.y = h
b.t = c
b.z = l
b.u = f
b.p = k
n.x = k
n.v = i
n.u = g
assert n.v.p.y.o.u.w.t.p.u.x.txt == "k"