class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: E = None
        self.w: B = None
        self.r: F = None
        self.v: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: H = None
        self.u: B = None
        self.o: B = None
        self.s: D = None
        self.w: G = None
        self.v: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: H = None
        self.u: B = None
        self.o: B = None
        self.s: D = None
        self.w: G = None
        self.v: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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