class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: H = None
        self.p: H = None
        self.u: B = None
        self.q: H = None
        self.x: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: E = None
        self.w: G = None
        self.x: F = None
        self.t: I = None
        self.p: F = None
        self.o: F = None
        self.z: F = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: C = None
        self.w: C = None
        self.z: E = None
        self.s: F = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: D = None
        self.y: F = None
        self.u: D = None
        self.p: H = None
        self.v: D = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: E = None
        self.w: G = None
        self.x: F = None
        self.t: I = None
        self.p: F = None
        self.o: F = None
        self.z: F = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: C = None
        self.w: C = None
        self.z: E = None
        self.s: F = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: D = None
        self.y: F = None
        self.u: D = None
        self.p: H = None
        self.v: D = None
        self.q: H = None
        self.txt = txt

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

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