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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: H = None
        self.t: E = None
        self.s: H = None
        self.z: E = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.v: B = None
        self.o: D = None
        self.r: E = None
        self.z: D = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: C = None
        self.r: D = None
        self.q: C = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: H = None
        self.t: E = None
        self.s: H = None
        self.z: E = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.v: B = None
        self.o: D = None
        self.r: E = None
        self.z: D = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: C = None
        self.r: D = None
        self.q: C = None
        self.x: E = None
        self.txt = txt

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

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