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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: C = None
        self.y: D = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: H = None
        self.r: C = None
        self.u: C = None
        self.s: B = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: D = None
        self.t: B = None
        self.q: H = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: C = None
        self.y: D = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: H = None
        self.r: C = None
        self.u: C = None
        self.s: B = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: D = None
        self.t: B = None
        self.q: H = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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