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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: H = None
        self.r: G = None
        self.s: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: C = None
        self.r: B = None
        self.v: A = None
        self.t: F = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: E = None
        self.s: F = None
        self.w: A = None
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: H = None
        self.r: G = None
        self.s: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: C = None
        self.r: B = None
        self.v: A = None
        self.t: F = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: E = None
        self.s: F = None
        self.w: A = None
        self.o: G = None
        self.txt = txt

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

l.w = b
l.z = i
f.t = k
f.r = k
f.s = k
f.w = c
j.r = c
j.v = l
b.x = i
b.p = k
b.q = n
b.s = d
i.o = e
i.z = c
n.z = b
n.y = j
n.x = i
k.x = n
k.t = n
k.z = j
k.r = f
k.v = l
k.q = c
c.x = e
c.t = i
c.s = n
c.w = l
c.o = k
d.x = i
d.p = k
d.q = n
d.s = b
e.t = k
e.r = k
e.s = k
e.w = c
assert k.z.v.z.z.txt == "c"