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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: H = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: H = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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