class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: G = None
        self.z: B = None
        self.v: B = None
        self.o: D = None
        self.s: E = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: G = None
        self.t: C = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: G = None
        self.z: B = None
        self.v: B = None
        self.o: D = None
        self.s: E = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: G = None
        self.t: C = None
        self.v: G = None
        self.txt = txt

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

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